"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.
0
votes
2answers
20 views
Override Taxonomy Template
I'm trying to list all the products tied to a specific taxonomy. For some reason the template won't work when trying to access "http://www.myexample.com/product_categories/funiture/", I tried ...
0
votes
1answer
22 views
How to define the template priority between built-in categories and custom taxonomies?
Let's say I want to create a custom template for my taxonomy customtax.
This is pretty simple, I just create a taxonomy-customtax.php in my theme directory.
Now, I'ld like to query a built-in ...
3
votes
1answer
177 views
CPT Template Not Showing - Getting 404
I'm developing a Custom Post Type plugin, which works fine in dev. Now that I've moved it to production, I'm getting a 404 when I try to display the template for the CPT.
So, two questions:
1- Is ...
1
vote
2answers
57 views
Custom Post Type Plugin: Where Do I Put The Template?
I'm writing a custom post type plugin. Part of it I'm outputting to the template via shortcodes. But other parts need a custom post template, and I figured out how to use the template hierarchy for ...
0
votes
1answer
46 views
loading custom registration template
I read this tutorial, here the author names the template custom-register.php and puts it in the theme dir and doesn't explain about how it's loaded by WP, I did the same way but the file didn't loaded ...
0
votes
0answers
35 views
Posts 2 Posts: Pagination for connected posts on single post template
I'm using Posts 2 Posts with The Events Calendar plugin. I've made a connection for events and posts. This way the site can display the Event details and blog posts about the upcoming event under it.
...
0
votes
1answer
32 views
Using index.php as page template
When you put a name at the top of your index.php like:
<?php
/* Template Name: Blog Template */
?>
it will work for front-page and it will also create a new page template. I'm wondering if ...
0
votes
1answer
23 views
Archive for custom fields?
Recently I've done a nice taxonomy system on my WordPress website. Created also the taxonomy archive template files, so wherever I'm listing the taxonomies I can click on them and will bring me on a ...
0
votes
0answers
25 views
How to create a category template for each category hierarchy level?
Is it possible to create a category template for each of the available hierarchy levels? Here's the structure I want to replicate:
Product A (level 0)
Subproduct A1 (level 1)
Subproduct A2 (level ...
1
vote
1answer
38 views
What should I put on my index.php?
I had covered basically all the pages listed in the Template Hierarchy:
404_template
archive_template
author_template
category_template
tag_template
taxonomy_template
home_template
...
0
votes
1answer
95 views
Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy
I've (I think) an interesting problem here. What I want to do is create a global archive page, with everything on it. Dates, authors, categories etc all on one page.
I have a child theme, with ...
1
vote
1answer
56 views
is_home() returns TRUE on page template
I'm wondering why my link: http://localhost/?page_id=3433 returns TRUE on is_home() usage:
if(is_home()){
var_dump(is_home());
die('test'); ...
0
votes
1answer
74 views
Organize template parts and page templates in folders in regards of template hierarchy
Hello and happy new year
Suppose one has a large theme composed of several post types, page templates and a bunch of custom loops and template parts which is best keeping in separate php files. ...
2
votes
2answers
69 views
Categories Template Assistance
I have found a tutorial online for creating a custom categories template for my archived posts within a particular category. This however is targetting a specific category ID (see below), is there ...
0
votes
1answer
341 views
How to modify/ customise NextGen Gallery's templates?
I would like to customise the "Image browser" template in particular.
I'm trying to make clicking on an image redirects to the next image in a gallery, just like how Facebook image browser works.
...
3
votes
1answer
97 views
How to use a specific category archive index as the site front page?
I investigated Wordpress hierarchy and have created a php file called category-image-gallery.php the link to this is http://www.phoneographer.org/category/image-gallery/ having uploaded it and added ...
0
votes
1answer
58 views
How can I sort posts ascending by post title for a specific post type, but on a category archive template?
How can I sort posts ascending by post title for a specific post type, but on a category archive template?
My schema involves a "video" custom post type and multiple subcategories of the ...
0
votes
1answer
234 views
Custom post type not using it's own single-postname.php
I have a custom post type (that I'm using on a template page), the custom post type is called 'headerhome'. When I post say a gallery there I'm trying to get it to redirect to 'single-headerhome.php', ...
1
vote
2answers
225 views
Different templates for parent and children categories/taxonomies
I would like to know what is the best way to create a different template for parent and children categories and/or taxonomies.
Example: I have a taxonomy called region, which I want to divide in ...
0
votes
1answer
74 views
404 on child page template
I have a page called portfolio and I have created several child pages for it like Video page, audio page etc …
I also created custom page template for portfolio and named its file ...
0
votes
1answer
219 views
Help Understanding Template Hierarchy
I must be thick, but I could use some help grasping the way template files are chosen to be used. I noticed loop.php is no longer around, and looking at the file structure for twentytwelve there is ...
0
votes
1answer
105 views
Wordpress Page Hierarchy
I have the following page on a site in development:
http://telamon.com.s137737.gridserver.com/media/press/
I want to do some stuff outside the loop, so I created page-press.php based on my ...
0
votes
4answers
1k views
Wordpress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
I've encountered a strange error while developing a custom theme.
After finishing editing the template for a custom post type single view, I passed onto working at the template files for pages and I ...
0
votes
1answer
175 views
Custom post types templates
I have registered a custom post type called "Services" but when I am giving the single post the template "single-services.php" its not accepting this but choosing the "homepage.php" template can u ...
1
vote
1answer
562 views
Is there a default template file for child pages / subpages?
This seems like a very simple question. I'm looking for something like sub-page.php or page-child.php where I can do some different things on the child pages of my theme.
They are different enough ...
1
vote
2answers
201 views
Change Page Template Based on Category
How can I display a post with a certain category in the page template instead of default category template.
For an example, I want to show all posts under category "Scott" with the page template ...
0
votes
2answers
597 views
How does WordPress choose archive type template?
I can't find a comprehensive list of criteria for how WordPress determines which archive type template it chooses.
From what I understand it uses URL forms for this purpose, like:
...
3
votes
1answer
209 views
Create “File-less” Page Template in Functions.php
(By "Page Template," I mean a theme file with the "Template Name" header that can be selected in the "Template" dropdown field on the page admin.)
In multiple instances, I've built page templates ...
1
vote
1answer
60 views
where is the code that executes the template hierarchy?
I can see a picture of the template hierarchy here, but where is the actual wordpress code which decides that it's a "category page" or an "archives page" or a "search page"?
2
votes
1answer
287 views
Display Editable Text Above CPT Archive Listings
I have two custom post types (Authors and Partners). I display their archive page's in the main navigation and use archive-authors.php and archive-partners.php to make a couple small tweaks to the ...
1
vote
2answers
103 views
Static Front Page problem
My theme uses the front-page.php file to display a number of items on the front page including a slideshow and some featured items. I have also designed it so the static front page as set in the ...
0
votes
1answer
210 views
anchor tag in header not working on other pages except the home page
I have a anchor tag that wraps around my logo image that takes you back to the home page using the following
<a href="<?php bloginfo('url'); ?>"><img src="<?php ...
2
votes
1answer
391 views
How can I set up a category “overview” page?
I know I can use the Template Hierarchy to set up custom theme pages for terms inside a category, like these:
mysite.com/category/tech/ // category-tech.php
mysite.com/category/blog/ ...
-3
votes
1answer
115 views
Get the current hierarchy php page
Does exist some way to get the current searched hierarchy php page in Wordpress?
I've set a default category to my posts named post so if I digit http://site.com/post which php page is searched in the ...
11
votes
4answers
3k views
single-{$post_type}-{slug}.php for custom post types
My favorite part of the Wordpress template hierarchy is the ability to quickly create template files for pages by slug, without having to edit the page in Wordpress to select a template.
We can ...