Which template.php for /blog

Use home.php, that’s the template for the list of newest blog posts. It will not affect the URL. If you go to wp-admin/options-reading.php and choose a page for Posts page – this page will use home.php. So create a static page, assign the URL /blog/ and select it in the settings. WordPress will take care … Read more

How can I include custom category and tag base in template files?

We were able to get custom category and tag base names using: get_option(‘category_base’, ‘Categories’) get_option(‘tag_base’, ‘Tags’) We wrapped these functions in ucwords() in order to capitalize the base name and replaced “_” with “”: ucwords(str_replace(‘_’,’ ‘,get_option(‘category_base’, ‘Categories’)) ucwords(str_replace(‘_’,’ ‘,get_option(‘tag_base’, ‘Tags’)) Finally we wrapped all this with the code for localization and added the single cat/tag … Read more

Help Understanding Template Hierarchy

Template hierarchy consist of templates, but not every template file is necessarily in hierarchy. Essentially hierarchy determines entry points (one of matching templates with pre-defined name structure), but from there template can further load additional arbitrary files. page-templates directory holds custom templates for pages (is_page() branch in hierarchy). It’s recent development that they can now … Read more

Using a specific template for front page only

Well first of all it depends how you are enqueing your other scripts but make sure you dont add them before the jQuery library itself has been included. There is nothing stopping you using conditional code in header.php to add scripts depending on the page that is loading, or even the template, category etc; <?php … Read more

JQuery Issues With WordPress Theme Interface

toscho…you were partly correct but helped immensely. Turns out the issue seems to lie within the theme’s attempt at calling up the scripts. My WP install is in a subfolder (/wp/) and it was looking for the wp-include scripts in the root folder. All other aspects of the site work fine, so I assume this … Read more

Blog page won’t show Blog template

Based on your comment: 1) blog.php What is the file name of your blog custom page template? 2) home.php What is the file name of your front page custom page template? The answer is simple: The home.php file name is a reserved file name in the WordPress template hierarchy, and is used by the template … Read more