"Template hierarchy" describes process by which WordPress determines which theme files to use when displaying a query. Index.php is the fallback for all queries, and, theoretically, the only theme file required other than style.css.

learn more… | top users | synonyms

0
votes
0answers
25 views

Template Hierarchy Question

Why does this: http://site-name.com/?custom_taxonomy=producttype use taxonomy-custom_taxonomy.php while this: ...
0
votes
1answer
47 views

How to add dynamic content to posts page, archive, taxonomies, search, author, etc?

I am building a Wordpress plugin, it is kind of a page builder and I want to allow users to manually customize the page layout by adding content/shortcodes to any page within the "Template Hierarchy": ...
0
votes
2answers
11 views

How to determine the template loaded when you are not an Admin?

I have a page that displays differently based on what type of user I'm logged in as, and I can't figure out why. Specifically, if I'm logged in as an Admin, the page displays one way, but if I'm ...
10
votes
1answer
233 views

Custom taxonomy query broken after upgrade to 4.4

I just upgraded from 4.2 to 4.4 and now my taxonomy query returns empty. It has been working fine prior to the upgrade. I have registered a custom taxonomy named 'title', which is used by my custom ...
0
votes
0answers
21 views

Using base.php to keep the code DRY

Predefined anatomy of a theme according to Wordpress documentation is like this: index.php header.php footer.php single.php page.php Normally you get partial files everytime in index.php, ...
0
votes
0answers
17 views

Pages with given names don't show correctly, others do

my wordpress gone crazy lately. I recently created a website with about 10 sub-pages. Everything was good - possibly translation update caused the problem. Now the problem is as follows: I have a ...
0
votes
1answer
46 views

Custom post type and taxonomy permalinks - Structure

Been trying to get a nest of custom post type and taxonomy working (even took a look here) but couldn't get it working 100%. Here is the thing, I created a custom post type texturas_temp and a custom ...
0
votes
1answer
41 views

Simple way to get two language WP site

I am trying to make a site with two languages. I was looking for solution and didn't found a simple how-to answer. Also, I prefer not to use plugins when it is possible. What I'm trying to do: 1) To ...
0
votes
2answers
18 views

get_month_link uses what wordpress template?

I tried using archive.php and category.php but always index.php is used of my template. How can I customize what template file is used?
0
votes
1answer
48 views

The best way to create pages like an 'about', 'contact' and etc [closed]

I develop my own theme and I need to create nice looking sites like a contact page or about me page. But I don't have any idea what wordpress template file I can use. Will I have to use page-template ...
3
votes
2answers
70 views

Taxonomy Templates… by hierarchical level?

I'm wondering if there's a way to specify by filename different templates for different levels within a hierarchical taxonomy. I know about taxonomy-taxonomyname.php and taxonomy-taxonomyname-term.php ...
0
votes
0answers
23 views

Different templates for categories without plugins [duplicate]

Is it possible to show category pages using custom page templates without plugins? I want to give the administrator the ability to add new categories and select templates. Something like this: ...
1
vote
4answers
95 views

WordPress Template Hierarchy

Hi I have question about file names. If I have custom post type, and for template I can create for example single-portfolio.php and get content of portfolio posts into this file, but i need to get ...
1
vote
1answer
49 views

Categories overview that links to page displaying posts

I am trying to achieve the following A page that displays a series of categories with a title, description and an image When a category is clicked, all posts that belongs to that category gets ...
0
votes
1answer
57 views

Templates for hierarchical custom post type

I'm a bit confused with templates for custom post types defined as hierarchical. I've got a CPT set to hierarchical, not strictly in order to have a nested hierarchy, but so that they can be ordered ...
0
votes
0answers
46 views

Wordpress override template hierarchy

add_filter( 'template_include', 'my_callback' ); this filter returns what template is there and what will be used, but i need to have all tries for finding template in template hierarchy, ...
0
votes
2answers
89 views

Category-slug.php not being used

I have this category-newbie.php template in my theme. And I have the category "newbie" in categories, but it is not using newbie it is using the category.php EDIT:
0
votes
0answers
42 views

Wordpress using custom template for sub-sub-category and posts within

I have created a big common category "Catalog" ($category->cat_ID = 2). It contains a few sub-categories like "Series1", "Series2" and so on. Every sub-category contains a few sub-sub-categories ...
0
votes
0answers
33 views

Custom Post Type below second level mainmenu

I want to have the following structure in my website menu: Home | for Beginners | for Experts | Contact | | Reports (CPT) Reports (CPT) Jobs (CPT) Jobs ...
10
votes
3answers
1k views

What is singular.php?

From 4.3 we have a new template, singular.php. I tried to understand what is it, but I didn't get it. :) The page.php for pages. The single.php for every post types. If we have single-[post-type].php ...
0
votes
1answer
27 views

Utilizing the template hierarchy while storing page templates in a subdirectory

I'd like to store the page templates for my theme in their own directory, /pages/ for example. I'd also like to utilize the page-{slug}.php functionality of the Template Hierarchy, and not have to ...
0
votes
0answers
88 views

Use different file includes for single.php

I'm beginning to convet html to Wordpress, I've some problem in single.php to show the post with different headers because mysite use in English and Arabic language. My site containings Arabic and ...
1
vote
1answer
96 views

Template Hierarchy tag-{slug}.php directory

When tag-{slug}.php is in the root of theme, say wp-content/themes/p2/tag-{slug}.php, the template hierarchy is respected. However, I have many such custom files and just cannot have it in the theme ...
2
votes
0answers
124 views

Loading partial templates with AJAX/PJAX

I am trying to load content using PJAX (basically AJAX with history). So far I have managed to catch PJAX requests and load the correct content. My problem is finding the correct template to use for ...
0
votes
0answers
28 views

WordPress Template Files added to directory after migration to Debian Server do not load, White Screen of Death

Okay here's the backstory: I run and develop a WordPress-based site. I work mostly in my editor and do not use the core WordPress backend anymore than I have to, I typically just work in template ...
0
votes
0answers
81 views

Best way to add custom code to pages in Wordpress

I've a question relating to Page templates in Wordpress. Firstly, I should point out that I'm about to undertake quite a large project for a friend of mine and I'm looking to to it in the best way ...
3
votes
1answer
173 views

Overriding default template if page slug and post type are same

I have created a post type named 'faq', and a page 'faq' for displaying the posts under faq. Also I have created a page template name faq and selected the faq page's template to this. Now the ...
0
votes
1answer
40 views

worpress sub taxonomy template

please see my code structure custom post type name : product custom taxonomy associated with product : category main category inside category taxonomy :main1, main2 etc sub taxonomy inside main1 ...
0
votes
0answers
61 views

Custom Homepage As Single Page or Custom Post Type?

Conceptual question for the WP community: I need to implement a custom homepage for a new site. It has some custom stuff going on but nothing too crazy: 4 big images, a carousel, some calls to action ...
0
votes
1answer
136 views

Ajax specific template not loading in replacement of index.php

Following my previous post (Full-Ajax Theme: parseJSON error while building a JSON object from a Wordpress custom template) regarding a few problems concerning JSON (now resolved), I am trying to load ...
0
votes
3answers
156 views

Custom Post Type homepage template

This is what I want: I have made a Custom Post Type in my theme and it shows in my home too, but the problem is that tha CPT takes the same elements and style of a default post in Wordpress, how I can ...
0
votes
1answer
40 views

Custom term templates

So, I did some research online but could not find a solid answer, so here I am. I am in need to make a custom woocommerce category page for a specific category. For example, I have a category called ...
0
votes
1answer
105 views

Taxonomy-$taxonomy-$term not working

This question might seem very simple, but I cannot find a proper answer for it. In my example I should have multiple pages that should display 'FAQ'. For that I have added custom taxonomy page_type ...
0
votes
2answers
66 views

Understanding the Template hierarchy

I've got a template called News. When I go to the Dashboard and edit the Page called News which has a web address of news.html I can see it uses this template (i.e. in the Page Attributes > Template ...
0
votes
1answer
28 views

Creating a Taxonomy Page [duplicate]

I am having a hard time wrapping my head around the way to set up a taxonomy template page. My goal is to create a taxonomy archive of a custom taxonomy I created. The page would only need to contain ...
0
votes
0answers
199 views

How to stop the search results from loading the wrong template?

I have a custom themed site which is not using the correct page template to display search results. I inherited the site with the theme and I'm now trying to make some changes; I did not create the ...
1
vote
1answer
378 views

Displaying all Video Post Formats to Page

I am creating a video-archive page for all the posts_format with video. Currently, I have: <?php $format = has_post_format('video', $post_id); ?> <?php if($layout != "fullwidth") { ...
0
votes
2answers
87 views

Custom templates vs page-slug

I've currently been using the slug to set the page template, using the normal hierarchy For example, if I wanted to change the page template for http://www.example.com/about-us, I would edit ...
0
votes
1answer
67 views

Which template name to use for taxonomies but not their terms?

I can't figure out which template name to use to modify custom taxonomy archive page, but not the one for terms in that taxonomy. My goal is to show terms list in custom taxonomy archive and in ...
1
vote
0answers
37 views

rewrite taxonomy-{taxonomy}-{term}.php terms

I try to figure out a rewrite problem, that is a somewhat over my head, so i ask here to find out what i can do. I use this two solutions from Jeff 1 and Milo 2, to get a full-path url for my custom ...
0
votes
1answer
135 views

Assigning custom page templates to a static blog page

I'm searching for the best solution to create custom layouts for blog pages in WordPress. Where you would normally select a custom page template from the Template metabox in admin to change the page ...
1
vote
1answer
58 views

Custom post type templating problem

I have a custom post type named 'product', with taxonomies 'brand' and 'type'. I'd like to have Archive Page A: sidebar with all the 'brand' terms linking to their respective archive page list of ...
1
vote
0answers
52 views

How to use multiple archive templates for a taxonomy?

I have created a custom post type (product) with a taxonomy (brand). I need to have the basic archive pages (type A) and then custom ones (type B) to create a product comparison page which esentially ...
0
votes
0answers
92 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
1answer
71 views

Show a custom template, no matter the page being viewed, if the user is not logged in

I have been tasked with creating a WordPress site where subscriberes (registered by an admin) are unaware of the back-end. I also have to make it so that upon navigation to any page, if the user is ...
1
vote
1answer
224 views

Is there a way to set different post templates for parent posts and child posts in the same post type?

After taking a look through the questions suggested to possibly have my answer, I still can not seem to find something that I references the post-template php files. I have two custom post types that ...
1
vote
0answers
151 views

WordPress Filtering Custom Post Type by Metadata and Search Heirachy

I have a custom Post Type called cptMovie which has two Custom Field (Metadata) "Language" and "Box office" assigned to it. I also have a Custom Taxonomy called movieTax with 4 tax Terms "Action", ...
0
votes
1answer
77 views

LOST in WP Template Hireachy

I am trying to create a Custom Theme which is supposed to list and dialysis Custom Post Types First Base on Taxonomy and In next page List and Display Them based on Taxonomy Term which linked from the ...
0
votes
1answer
32 views

Needed to change slug to access page

I've created a page, with the slug "news". Something happened because now I can't access /news .. I needed to change the slug to "news_", or something, to access that page. I checked the database to ...
0
votes
1answer
125 views

Displaying a custom post type and an archive page

I have created a custom post type called articles that will display an article each month. This custom post is hierarchical (which means it will also have children posts related to that monthly ...