I’d like the front page / home / index to show some extra blocks plus the list of blog posts. However, I want the paginated pages (e.g. /page/2) to not have these extra blocks and only show the list of blog posts.
My question is: is there a way to use a different template for the index and another different template for the index’s paginated pages?
]]>i would to make a feature request on worpdress.
it would be a good idea to give us the possibility to create custom template hierarchy in worpdress.
example, i would to create a profile page who inherit author template hierachy.
the possibiltiy to build a class who extends the author class would be usefull…
The problem I have is that the page.php file is not being picked up for high-level pages. It works for child pages. But high-level pages are being displayed with index.php (I have no home.php page.)
The site is set up to display a static front page using front-page.php, which works correctly. Blog archive is supposed to display using index.php, which also works correctly.
But my 3 parent pages, which are linked in the “About Menu” in the footer of the page are all displaying incorrectly, using index.php instead of page.php. Child pages such as /about-mdd/interviews/ are displaying correctly using page.php.
Possibly related: any URL like martindenton.com/xyz also displays the index page rather than the 404.php page. Incorrect category urls work correctly showing 404.php.
Would appreciate any help, thanks!
]]>I have a default post category called Relief Fund which has the slug relief-fund.
I understand from the docs that I should be able to create a template with the name single-post-relief-fund.php that displays inidividual posts from that category. To quote the docs (and I have highlighted it below):
The single post template file is used to render a single post. WordPress uses the following path:
single-{post-type}-{slug}.php – (Since 4.4) First, WordPress looks for a template for the specific post. For example, if post type is product and the post slug is dmc-12, WordPress would look for single-product-dmc-12.php.
single-{post-type}.php – If the post type is product, WordPress would look for single-product.php.
single.php – WordPress then falls back to single.php.
singular.php – Then it falls back to singular.php.
index.php – Finally, as mentioned above, WordPress ultimately falls back to index.php.
However, the more specialised one is being ignored and the single.php is being used instead. I have checked the DB that the post-type is indeed ‘post’ and it is. Am I missing something?
]]>I have a default vanilla post category of relief-fund and tried creating a template file called single-post-relief-fund.php that I understood from the docs that the hierarchy should be used to display that category. I reproduced it below:
The single post template file is used to render a single post. WordPress uses the following path:
single-{post-type}-{slug}.php – (Since 4.4) First, WordPress looks for a template for the specific post. For example, if post type is product and the post slug is dmc-12, WordPress would look for single-product-dmc-12.php.
single-{post-type}.php – If the post type is product, WordPress would look for single-product.php.
single.php – WordPress then falls back to single.php.
singular.php – Then it falls back to singular.php.
index.php – Finally, as mentioned above, WordPress ultimately falls back to index.php.
However, the template being used is single.php and it ignores the specific one. I have checked the db and post-type is definitely ‘post’. Am I missing something?
]]>I’m trying to build custom layout for brand pages. I tried to create taxonomy-pwb-brand.php
template, but archive-product.php
is always loaded. I tried to create taxonomy-product_cat.php
for custom category and everything works fine.
What I’m missing? Why it’s not loading? I have add_theme_support('woocommerce');
. I’ve tried to disable all other plugins also..
I’ve implemented the plugin, all works like a charm. However: I’d need the event page to show with a different theme layout, instead of the default one.
I think it’s currently using wp-theme-root/page.php
I need it to point to wp-theme-root/page-landing.php
Can you suggest what code I’d need to edit to have it point to / include that theme template file?
Thanks!
]]>Is there a simple fix I can make to force the wordpress engine to call the right template? Digging into the DB to fix problems is a bit beyond my skillset with wordpress, so ideally there could be some tweak to the wp-admin or even the template pages themselves to ensure that the right template is called each time.
Many thanks–
David
]]>