Tag Info

Hot answers tagged

2

The correct way to load footer-none.php is: get_footer("none"); Anyway, I think it can be better to use wp_footer() (required function on any frontend page) directly in the page template file so you don't need to load any empty footer template (assuming you load all required HTML tags in the page template, for example closing body and html). If you are ...


1

In your wp_query loop you'll want to check the page template of the current post object. You'll be able to set that to a string and use it however you want Close to this: while ( $query->have_posts() ) : $query->the_post(); if (is_page) { $pageTemplate = get_page_template(); echo "<p class=\"" . $pageTemplate . "\">" . get_the_title() . ...


1

Since WP 3.4 page templates can be stored in theme root folder or direct sub-directoryr, that is no problem. But rename page templates, which include moving files to other directories, will unassign that page templates for all pages currently using it. To reassign the page template, simply edit the page, and reselect the desired template. About the ...



Only top voted, non community-wiki answers of a minimum length are eligible