Unfortunately it’s not possible. There just aren’t any filters for filtering templates loaded with get_template_part()
that you could use to achieve this.
Related Posts:
- Passing variables through locate_template
- How to use get_template_part()?
- Is there a variable for a template parts name?
- How to make get_template_part always check child theme first?
- Check if partial file is called from within header.php or footer.php
- Too many get_template_parts?
- get_template_part() does not work if you call it when you are in a subfolder
- Pass a variable to get_template_part
- get_template_part inside get_template_part?
- Getting the chosen template when iterating through pages
- Possible to use pagename inside get_template_part?
- Why would include(locate_template) work but not get_template_part()?
- How does get_template_part() work inside a loop?
- Is there a tirck in the get_xxxx function in the general_template.php file?
- Problem with using get_template_part() in footer
- get_template_part() based on get_post_type() for a custom post type instead of get_post_format()
- Using get_template_part to retrieve a template file based on current post type
- add a hook with get_template_part()
- ä/ü/… are not displayed when including via get_template_part()
- Change the file path on get_template_part via plugin
- How to limit the number of Related Posts?
- get_template_part – how to find html file which is being render
- Get_Template_Part And Two Global WP_Query On Frontpage
- The use of get_template_part() returns ‘invalid argument’ loading options
- Passing a variable from the archive page to the default template
- For which reasons can get_template_part’s $args fail to work? (WP 5.8.1 – PHP 7.4.23)
- Can I set a global base path for get_template_part?
- how to use a different template (index.php) in wordpress
- What are the benefits of using get_template_part()?
- Include template file from plugin to theme
- get_template_part doesn’t output all data
- How to include a file using get_template_part() in a plugin?
- Using a custom WP_Query with get_template_part loop
- Is it possible to override the result of get_template_part()?
- Should we use get_template_part() in functions files instead of include_once?
- get_template_part from plugin
- Variable use in get_template_part
- Get the php template file from other theme folder
- Loading page content into a variable in template
- How can I see what template parts are being called for rendering the viewable page?
- Get template part vs locate template function
- Single Page WordPress Theme – Using page templates
- _wp_page_template to dynamically use template
- Templates & CSS – Proper Programming Practice?
- Which custom query am I in and how can I access its properties & methods?
- Passing variables to template parts
- Correct way to use get_template_part() and get_post_format() with custom post types?
- How to pass variables with get_template_part?
- Unable to include a template
- How to make get_theme_mod work with AJAX in the customizer preview
- Some doubts about how to show posts in a custom theme?
- get_template_part() – post-meta not working?
- How to get_template_part using AJAX?
- Where is the template for the ‘standard’ format of a post in the theme twentythirteen?
- Valid HTML in Template Part
- get_template_part and template file names
- how could I load a different template part by page
- Problems with loop
- Detect if current page is front page within custom query
- Is there any problem if I use get_template_part like this?
- get_template_part for specific page
- get_template_part causes 500 error
- Insert template-part inside the content
- Check for the main query from the template
- Custom post type index (maybe using get_template_part)
- How to pass a variable to get_template_part that’s updated every time the template part is called?
- How to create new template page and template-parts in wordpress theme [closed]
- Select through customizer the template part to be viewed
- get_template_part() Not Working in Loop
- Remove get_template_part() from custom theme
- Does get_template_part() content gets parsed if it’s not executed?
- Get_template_part seems to be ignoring my template
- Get_template_part() problem with the_content()
- Is there a way to retrieve the calling template part?
- Problem with Front-Page.php loading recent posts
- Including template pages within another template?
- get_template_part function and add images
- get_template_part() isn’t loading author information
- Is “get_template_part” hierarchy possible?
- On click some element i want to use some template
- Template not loading with get_template_part or locate_template
- How to declare a variable in a loop and make it available in the template file
- Load templates, pass arguments, and render output from functions.php
- Is_Page doesnt detect my page
- Display a custom 404 page without a redirect
- get_template_part calls amount and performance?
- How to get value from radio buttons meta box, and return different contents?
- Looking to load a different template part on every load/refresh
- When to use content-pagename.php?
- Theme parts path location dump
- How return normal search result using wp_ajax action for wordpress
- query_post while (have post) get_template_part()?
- Taxonomy template for all taxonomies attached to certain post type
- how to modify request to get_template_part()?
- wordpress header leaks into body in a specific template
- If I define a variable in header.php, how do I make it available to templates?
- Make a PHP file with a function
- Headers already sent error with get_template_part in REST API call
- get_template_part() does not render after the ajax request
- Separate page for pagination possible?