Creating custom blog page template the right way

Don’t forget that WordPress was primarily designed to be a blogging CMS, so when it comes to theme development, developers often opt for a non-standard approach in exchange for the potential for more features. Theme developers have three options when they approach this, one of which (#2 below) you mentioned. Directly edit the index.php to … Read more

What does is_page_template() compare against?

Your condition should be written like this: if (is_page_template(‘path/file.php’)) { // Do stuff } I believe the confusion is a result of two things: The docs refer to “name” ambiguously. Specifying “file name” would make the documentation much more clear. The code behind is_page_template() shows the get_page_template_slug() function at its core. This function actually returns … Read more