When I want to change a specific part of template, such as header OR footer then I use conditions like this –
if(is_404()) {
get_header(`error`); //loads header-error.php
} else {
get_header(); //loads header.php
}
In your case, you want to load a completely different template, Now the only action hook I can imagine is – template_redirect
, Which can be used to tell wordpress to load a different template as per conditions.
Example –
function wpse62337_zurbified() {
if ( CONDITION ) {
include (TEMPLATEPATH . '/zurb/page.php');
exit;
}
}
add_action('template_redirect', 'wpse62337_zurbified');
Related Posts:
- Opinions and recommendations on the best barebones base theme [closed]
- Dynamic template serving, change theme_root using add_filter from current theme
- How to refresh WordPress Customizer panel upon entering a value
- How to override the “inc” folder (or any folder) in a theme using child theme?
- Is it possible to access Gutenbergs reusable blocks in CPT block templates?
- Loading template files from a subfolder in my theme?
- WordPress as Backend, Laravel Front End: How to connect Routes?
- Can I obtain differents links for different installed theme?
- WordPress ignoring specified template for front page. Why?
- Can I apply a WP theme to a specific custom page template?
- How get Themes list via REST api?
- WordPress Fatal error: Call to undefined get_header() in index.php on line 15 [closed]
- Change Theme from Plugin based on query_vars
- How to add template to theme in WP
- Added a new template file to a theme – get Call to undefined function error
- How to find a file in WordPress themes [closed]
- Display a specific dynamic sidebar widgets on a specific page
- Disable Theme API / Front end (for API only environment)
- Child theme Page Template not loading
- Creating new templates in child themes breaks layout
- Get WordPress to use another custom “author.php” file (“custom-author-file.php”)
- Search form not finding content in template page
- display comment form for specific post id
- Selected template is not respected for home page in WordPress
- Putting two themes together to create a complete site
- Is there a way to upgrade a theme without losing custom templates?
- Need help with making a website where user can add products
- Advantages of wordpress theme vs wordpress as a backend only [closed]
- What’s a good way to unenqueue all scripts for a single template page?
- Using the same database on another Subdomain
- Trying to fix a website that was built with WordPress and then taken off of it
- Conditional config WP_HOME/WP_SITEURL does not update bloginfo(‘template_url’)?
- Create Custom Attachment Template That is Processed from Plugin Folder?
- How to remove the tripadvisor logo from the wordpress theme?
- Please help me clear my confusions about WordPress
- WordPress 2022 template, how to see the blocks added in post template on post edit?
- Get the name WordPress default theme in the core
- Can I use non-wordpress themes in WordPress?
- WordPress keeps switching back to empty template
- Removing a widget via theme editor
- How do I bring a page template into a new theme with separate styling?
- 12 column grid layout
- WP Customize API Checkbox change value
- Theme Dev | Convert Template to Theme
- Revamping a WordPress mirror site – and I don’t know where to start!
- What is the template file for topic layouts in bbPress?
- Does WordPress provide themes_api function?
- Will this js code work in a page template?
- How to find out which template the HTML content comes from?
- Create a child Theme or custom Theme
- How to modify/ customise NextGen Gallery’s templates? [closed]
- wordpress template page Usage [duplicate]
- Overwrite template-tags.php in child theme
- What happens to bespoke page template references on theme change?
- Rest API does not work after changing WordPress Theme
- Page structure using The Customizer Api
- How to add sidebar to homepage programmatically?
- Get header/footer list for a theme
- Homepage not loading correctly, only after refreshing
- How to clone a theme template from within WordPress? [closed]
- how to add version of style.css in wordpress
- What is the role and history of the $content_width global variable?
- Is it possible to stop a theme activation when a certain plugin is not activated
- add image size still doesn’t work even after regenerating thumbnails
- Best location for theme translation files
- How to develop a theme while having another show up
- When does WordPress wrap inline scripts in CDATA?
- Switch to other theme at URL
- How to go about pre generating css file with variables from theme options
- How can I create an “excerpt” with text that won’t be displayed in the post itself?
- How to change sidebar per page?
- WordPress Theme Development Seemingly Awful Partitioning of Includes?
- Static page not working
- Error defining a gutenberg block in a theme
- Page dissapears when i click save
- Is wordpress big enough for my project [closed]
- How to get theme screenshot
- Theme doesn’t support shortcodes
- Trying to uninstall a theme, but it’s hijacking my home page
- How to add some php code in header.php using plugin
- WordPress Theme and Plugin Name extraction
- Alternative to Back End Dashboard?
- Adding a template in WPTouch
- List of categories instead of dropdown menu selector in admin options
- How can I show some standard html code across any theme I install?
- Losing theme customization when switching from a theme to a child
- Problem of not changing the front and bottom of the Woodmart template by activating the really simple ssl pro plugin in WordPress
- How to implement theme option to change bootstrap 4 container from .container to .container-fluid
- use a Thumbnail size in post
- Why does WordPress Editor Only Use Half the Box?
- 500 Internal Errors
- Installing Theme from uploaded file. Not uploaded theme?
- WordPress theme not updating in Other browsers
- Can i add wordpress editor to my custom theme option? [closed]
- Where do URI files come from?
- Best way to include pagination in a theme [closed]
- How to change the standard width of a page
- Wrong theme being activated
- I am unable to remove “© 2022 My Blog | PopularFX Theme ” from footer [closed]
- Workaround AJAX calling without directly calling WordPress backend (Admin dashboard) because it is restricted to the end user (the public)