Within the context of WordPress Theme-ing, the term 'template' refers to PHP files used to display content.

learn more… | top users | synonyms (1)

1
vote
0answers
37 views

Using wordpress templating for html emails

Im working on a plugin that needs to send out an email after a form submission. Im using wp_mail for this, and it works perfectly fine. My problem is that in my code the html is generated by a bunch ...
1
vote
0answers
24 views

Page template no longer exists - metaboxes won't save

Ok, this is a weird one. I first experienced this on an older theme that I developed - I assumed I had some buggy code in there somewhere, but couldn't figure it out even with the help of another ...
1
vote
0answers
46 views

Plugin templates vs Parent Theme

I've been building a plugin using a WooCommerce like template system, where the plugin houses the default templates, but allows for overriding via a template folder in your active theme. It just ...
1
vote
0answers
103 views

Turning on the 404 page on localhost

I'm using my localhost (XAMPP client) to test my WordPress website and everything works fine, till it comes to verifying how does my 404.php template looks like. I can't preview any changes, because ...
1
vote
0answers
57 views

Search form not finding content in template page

I created some template pages on my wordpress theme and when I'm trying to do search for some words it returns Nothing Found. When I tried to search for words from the posts or normal pages(Not ...
1
vote
0answers
109 views

Checking for page templates in child theme

I have a simple problem I'm hoping someone can shed some light on. I have a child theme with a custom page template and I'm simply trying to check weather or not the template is in use. Under normal ...
1
vote
0answers
107 views

WordPress Not Using Template Files After Permalink Update

I have a really weird issue that just occurred on a client site. I updated the permalink structure from /%category%/%postname%/ to /%postname%/ and suddenly my pages don't respect templates and are ...
1
vote
0answers
424 views

Wordpress custom taxonomy template not working

I installed theCartPress plugin and it created tcp_product_category taxonomy for tcp_product post type. I created a page with custom template to list all the product categories. I can use ...
0
votes
0answers
19 views

Loading different template on different url of same page

I have successfully add rewrite rule and tag for a page. My page slug is my-page. when my url is mysite.com/my-page then the right template is properly loaded. I have set a custom template for ...
0
votes
0answers
24 views

why get_header doesn't work twice in a test

I'm trying to test a template. It's working fine individually until I run all the tests altogether and the tests fail. protected function load_template() { do_action( 'template_redirect' ); ...
0
votes
0answers
20 views

Page Templates Used in Custom Post Type

The same question was asked here with no real response. They claim it's not possible but I have used plugins that accomplish this. In WordPress I am having a problem figuring out how to use the ...
0
votes
0answers
27 views

Where to find the newly created page?

When we customize a theme and create new pages, where can we find them in root folder? I tried it searching a lot, but could not find. Any suggestions?
0
votes
0answers
22 views

Search for posts with specific tag inside custom page template

I'm developing a Wordpress blog where there are two custom pages - i.e., different from index.php. In there, there are two albums of photos, with the photos listed on a div above. I've put an input ...
0
votes
0answers
14 views

Adding a hash to a url in .htaccess

I am using a js hash listener to display a modal window if the /hash matches the id of the element. /brands/type/#name-of-product Works fine. However, default WP behavior will match any ...
0
votes
0answers
9 views

Ouput rel attribute on links in Gallery Shortcode within template file

I've added a gallery into a template file using echo do_shortcode('[gallery link="file" ids="1,2,3,4,5"]' ); When I use just the shortcode within a post I get a rel attribute on the links to the ...
0
votes
0answers
36 views

Use one template for different custom post types with the same markup

I am wondering how I can create one template for multiple custom post types. How can I achieve this?
0
votes
0answers
28 views

How to avoid hardcoded text in a custom page template?

I'm developing a company Website using Wordpress 4. This website needs some special, customized pages - with forms and GET and POST and a lot of stuff, so a lot of PHP code. Now, a CMS' main purpose ...
0
votes
0answers
28 views

How to generate custom loop indexes

Besides the regular taxonomies, such as category, tag, author, archive, I also have some special indexes to display, such as list of all sticky posts, simple chronological index of all posts, top ...
0
votes
0answers
24 views

Displaying all posts of a category in a page, using a template?

I am writing a plugin which (among others) wants to display posts of a certain category within a page. While I can do that with the various functions there are available (WP_Query etc) to iterate ...
0
votes
0answers
41 views

Redirect File Custom Post Pagination Problem

I've created a custom taxonomy type ( gallery-type ) for gallery post type! But, I didn't create for taxonomy-gallery-type.php in my theme folder, but I redirected to another php file from theme ...
0
votes
0answers
162 views

admin-ajax.php not working after wordpress 4 update

n WordPress 3.9.2 access to admin-ajax was working for non loggedin users. When I upgraded the script stop working. I have the following code in functions.php function theme_name_scripts() { ...
0
votes
0answers
98 views

Send post id through ajax and get the post content back

First of all i want to say that I am a WordPress beginner :). I am trying to get a post content in a modal by using ajax. So i send the id through ajax, but i cannot execute the php code anywhere on ...
0
votes
0answers
41 views

get_file_data to read data for Custom Template File?

I have a plugin in which I'm trying to allow users to create their own variants of the styles, and upload them as custom "templates". Essentially these templates are php files with some HTML in them. ...
0
votes
0answers
60 views

What is the right way to replace a post type's template?

Recently I authored a plugin called Ultimate Post Types and now I have a conflict with the "Virtue" theme from WordPress.org My plugin is useful for quickly creating post types through the admin. ...
0
votes
0answers
16 views

Can you create your own widgets and use them for editable areas of client content?

I'm relatively new to WordPress. As a content management system I chose WordPress so that I could design a website for a friend in a way that would be easy for them to use when I had handed it over. ...
0
votes
0answers
27 views

Using shortcodes that wrap around code

I'm using a membership plug in that requires me to wrap protected pages in a short code [private]content[/private] I want to use this code in my template so my client doesn't have to manually insert ...
0
votes
0answers
21 views

issues with templates

I'm working on a wordpress theme and I'm having issues with the page templates. I'm trying to do the following. I have a static front page, one custom post type and single "pages" that are ...
0
votes
0answers
15 views

How to Create Category Template list Subcategory?

im have database category -Category 1 --S1 Category 1 --S1 S1 Category 1 --S2 S1 Category 1 --S2 Category 1 -Category 2 --S1 Category 2 -Category 3 How to create check in Category as: Is go to ...
0
votes
0answers
67 views

Is this the best way to complete disable category archive pages?

I wanted to disable category archive pages because content in my blog will be presented via a number of pages for which I have custom templates like this: add_action('page_template', ...
0
votes
0answers
73 views

Perform internal redirect in WordPress?

Let say I have an existing page named "bar", e.g. http://www.example.com/bar I want to write a plugin, which when called, will load the content exactly same as bar (not just post_content, but the ...
0
votes
0answers
33 views

What is the best way to store HTML fragment in WordPress?

Let say I want to store an HTML fragment in WordPress and allow user to update/modify, e.g. site wise notice, what is the best way to store it and present them in a theme? e.g. write a plugin to ...
0
votes
0answers
18 views

Is it possible to create an empty page template and build it choosing between custom components?

I'm quite new to WordPress development and i didn't find much online about this topic (maybe i'm not searching with the right WordPress terminology). I'd like to know if it's possible to have an ...
0
votes
0answers
41 views

Most efficient way to have 1 template for parent, 1 template for child categories?

This is the setup I want: For category-15.php: Child Category A (list of all posts inside) Post A from Child Category A Post B from Child Category A Post C from Child Category A ...
0
votes
0answers
55 views

How to display custom taxonomy

I have created city taxonomy in back end and i have added mumbai,pune,nashik city in city taxonomy like bellow snipe. My problem is that when i click the city for example mumbai i want display the ...
0
votes
0answers
15 views

Only display custom fields that are associated with template

I am in a predicament where I have entirely too many custom fields displaying in my admin. Ideally I would like to filter through all custom fields created for my site and only display the ones ...
0
votes
0answers
163 views

Passing query variables to a custom page template

On my website I have a custom post type called 'theme'. I wanted the homepage to display an archive of themes. For this the only approach that I could think of was to create a page template with a ...
0
votes
0answers
11 views

How to fix missing information in a wordpress feed?

I am a new wordpress developer maintaining an existing site. The site has a custom template. If I go to mysite/mytemplate/feed I get a feed of that template -- except that one of the fields is empty. ...
0
votes
0answers
93 views

Include Wordpress Page in TWIG Template File

A programmer recently converted my Wordpress site to the TWIG engine and I am having a great deal of difficulty trying to include the contents of a page in the template. Below is my TWIG file for a ...
0
votes
0answers
29 views

How to include and handle more or less static text blocks/columns in a template

I have a front-page.php template, which contains dynamic content pulled from custom post types (like dates and quotes) but also more or less static text blocks in several sections alongside. The text ...
0
votes
0answers
63 views

Plural/singular URL schema challenge for section Page template combined with single Custom Post Type template

I'm coming back to WordPress after quite a hiatus (and it's not my normal CMS framework), and I'm working with custom post types for the first time. I'd like to have 2 page templates that support ...
0
votes
0answers
24 views

Cookie free site

I have followed directions to make my wordpress cookie free. I've made my subdomain, pointed to my php folder and now I'm stuck. What am I suppose to do with this: bloginfo ('template _directory') ...
0
votes
0answers
38 views

Adding The Post Template Dropdown to WP-Admin

I'm developing a WP theme from the ground up for the first time. Having build WP sites before, I know there to be an option in Posts that will allow for the selection of a specific template. I have ...
0
votes
0answers
45 views

Posts page template: How can I edit the markup for this?

I have in settings->reading changed the front page to display a static page. One for home, one for news with a custom template for each. Home works fine, however News will not change no matter what I ...
0
votes
0answers
133 views

How to show blog post details on a different page?

I have currently made a template to list my blog posts <?php /*template name: Figures */ get_header(); ?> <?php nectar_page_header($post->ID); ?> <div class="container-wrap"> ...
0
votes
0answers
20 views

Auto-Create Pages from Template Directory

Is there a way to have WordPress automatically create static pages from all of the template files in a given directory? So rather than manually creating custom page templates in the WP dashboard, I'd ...
0
votes
0answers
30 views

Use custom posttype archive template for its related taxonomy term page?

I have a custom posttype "Mypost" which has taxonomies tax1, tax2. I want to use the "Mypost" archive template for the tax1 and tax2's term page. How can I do this?
0
votes
0answers
27 views

Wordpress templates bug

I have a WP problem that's driving me crazy. I have created several templates, and it decides to switch them all the time... I think it does when I create a new template file, but it never did that ...
0
votes
0answers
41 views

Problems With Query and/or Template Part and/or PHP

I'm trying to show only the last article. I made content-latestnews.php and it worked before meddling with queries. Template part was shown, but after I tryed to show the actual content it would show ...
0
votes
0answers
152 views

Only show top level posts of specific category

I've been trying to create a loop that will only show the top level posts no children/sub category posts. Basically what my categories look like are -- -All --one --- A --- B -- ...
0
votes
0answers
21 views

Specify which template to use by link?

Is there a way to specify which template I want to use when clicking a specific link? Specifically, I have my tag template listing all posts that have a certain tag. My page for the category ...