add_filter( 'template_include', 'wpsites_home_page_template', 99 );
function wpsites_home_page_template( $template ) {
if ( is_singular( 'page' ) ) {
$new_template = locate_template( array( 'single_page-template.php' ) );
if ( '' != $new_template ) {
return $new_template ;
}
}
return $template;
}
You should be able to tweak something like this to get it to do what you want.
Related Posts:
- Store Page Template Files in a Subfolder
- Creating page & post templates without template file
- The best way to create pages like an ‘about’, ‘contact’ and etc [closed]
- Static page won’t identify template
- Utilizing the template hierarchy while storing page templates in a subdirectory
- I’m building a WordPress theme and noticed that the 404 page template runs along with the corresponding templates for each page. Any idea why?
- is_page_template not working
- When is get_template_part() preferable to simply using the template.php files?
- Is it possible to manipulate the list of page templates?
- Is there a default template file for child pages / subpages?
- Password protected posts redirects
- Variable use in get_template_part
- Overriding page template using page_template filter
- Dynamically assign same page template to child page as parent
- What content should go in index.php?
- Templates & CSS – Proper Programming Practice?
- How to show a post single post in page template
- How to pass a numeric id to a page template?
- Create a new template for twentytwelve
- Posts archive index pagination in a static page custom query
- Video Background – (php & css) – generating 404 error on page load – WordPress Theme File Structure Help
- is_page_template & is_page in functions.php not working
- get page title, url and excerpt of a page
- Theme’s page.php and index.php template files are confusing me
- Use is_category(), is_tag(), … in functions.php
- wp_title() handling of author page
- Why am I getting syntax error, unexpected ‘endwhile’ (T_ENDWHILE) in this template? [closed]
- How to edit 404 content via wp editor?
- How to handle a missing page.php?
- Customize edit.php Pages listing in dashboard to show only pages with a particular template applied?
- Remove all theme CSS & JS from wp_head (but only for 1 page template)
- remove page template from dropdown?
- Export csv and force download in template page
- WPML in custom page templates
- Programatically changing template of a page
- Why (and how?) is get_header() erasing all my stuff?
- WordPress can’t find IXR_Client
- Creating a new page template
- page.php not displaying content
- Creating a custom archive template that sorts post by date
- Use the_title_attribute() for the WHERE parameter in a page template
- Only show content if current page is NOT one of 2 page templates [closed]
- Conditional get template part
- How to make text show up – new page template
- Adding general page content to page templates
- Content pulled from page template instead of editor
- SuperCache for Custom Templates
- How to use multiple archive templates for a taxonomy?
- Page template for blog not working
- How can I conditionally show different home page templates based on whether or not the user is logged in?
- !is_page_template not working with && operator
- Is there a way to create a template that does not have the site styling associated with it?
- WordPress 3.3.1 Page template not showing in admin area
- What is wrong with my page.php?
- wp-cli for Creating page-template
- Single page Template for pages that begin with ‘confirmation-‘
- Want to exclude slider from page.php in header
- Can i forget about the post loop inside the page template?
- Display ACF if parent page has specific template
- How to make Dynamic Page Template based on Post ID’s
- Template Tag Does Not Work in Page Template
- Where to put custom page templates in theme?
- Does get_template_part() content gets parsed if it’s not executed?
- Get_template_part seems to be ignoring my template
- Function to load correct CSS for Template not working
- How can I correctly redirect user to the submitted post and define a template for each new post in WordPress?
- How to display all child/sub pages from all parent pages?
- different sidebars depending on template (is_page_template is not working)
- WordPress page template to show posts as per category dynamically
- page.php template file render a core gutenberg component programmatically
- Subpage is redirecting to spam site
- How to load page template according to the Searched Page
- Set page template automatically according to parent slug
- How to display the contents of URL1 when user visits URL2
- How to require specific PHP files for specific templates
- My WordPress installation doesn’t load correct template
- send page ID’s to another template
- Restrict Access to Logged-In Users Page Template
- Is there a universal slug for static homepage?
- require happens out of order
- What is the best way to manage pages content?
- how to get the title, description, pictures on the page?
- Add additional templates to the templates drop down on add page menu [duplicate]
- Page Template CSS file not loading
- Custom templates stopped working
- .htaccess help to a beginner
- Decision about page templates for static pages
- Single page theme: Can I render other pages with their respective themes within another page?
- WP Template Hierarchy – Need help choosing the correct templates
- Special 404 header page
- Custom page Template and Script as a Plugin
- Using page template as Static Front Page
- Why do some pages on my site use the previous theme?
- How to move from page template to page template
- Recents posts pulling from different post type
- Template tag for /page/# structure
- Add a title to ACF form from frontend
- How do I create a page template that doesn’t show URL, sidebar, nav menu, footer?
- Custom page template not working on mobile
- How do I update the SEO information on dynamic pages being generated from template_include?