locate_template()
is not pluggable, and there’s no filter. A filter was proposed a decade ago, but it hasn’t been implemented. The ticket for that is here, so you can read that discussion to get an idea of why it might not have happened yet.
The template hierarchy filters might be helpful. They will let you filter the template hierarchy for the top-level templates like page.php
, date.php
, or category.php
etc. Similarly, the template_include
filter will let you replace the entire template used to render any given page.
But really, WordPress is not designed to support 3 levels of inheritance for templates. The “proper” solution to your problem would be to copy the child theme to a new theme and make your changes to that.
Related Posts:
- Reusable functions and tools (Framework)
- How to override any plugin file in the child theme
- Where do I put the code snippets I found here or somewhere else on the web?
- Disable plugin / plugin action via theme
- Shared functionality in plugins and themes
- Customizing subject in comment notification e-mails
- Common functionality between my own plugins
- Need to create a Theme demo site that features multiple themes
- How to Loop Plugin Option Field Set?
- Declare a function before plugin does on the theme functions.php file
- How to handel multiple checkbox field in the admin settings page with Settings API
- Why does including a file in theme’s functions.php not work?
- Function to activate WordPress theme inside a plugin
- wp_insert_user – how to send verification email before logging in
- Editor access to plugin settings
- Saving Plugin settings to the database
- Shortcode display outside the div
- Execute a function using ajax
- How do you auto-activate plugins from child themes
- Should I use RIPS tool to test my themes and plugins?
- Add Top-Level Menu that opens URL
- Use functionality of 2 wordpress plugins
- What is the function to get plugin base url in multisite?
- Fatal error: Class not found in
- Workflow and best practice for documentation [closed]
- Extend Elementor Archive Posts widget with a custom skin in order to show multiple badges
- HELP: Integrating WP with raw PHP code once published button is hit
- Can wp_script_is used in pluginA check if a script is being enqueued/registered from pluginB?
- I would like to use create a function in my custom plugin to tell WP to use a different header
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin
- unzip a folder on specific location and delete the zip file
- Placement of Code in Plugin for hooking `save_post`
- add_action in functions.php, do_action in plugin?
- Scope for PHP Variables Assigned in functions.php or a plugin
- The Point of Using apply_filters()
- How to get variables from fucntion.php to my plugin files
- How to include code into functions.php file via a plugin
- Avoiding Duplicate function names in Post Loop (WP_Footer script)
- How to add class in plugin only for network site?
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- plugin development: problem with functions
- How to get current post user id
- wordpress plugin is not activating from widget
- Edit Yoast SEO breadcrumbs output [closed]
- Display post lists in 2nd paragraph
- Using a post-signup hook to get user details
- Plugin-generated pages use Not Found or Pages Archive templates?
- creating html reusable blocks via shortcodes
- Is there any kind of theme on WordPress to sell my own movies?
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- All sites themes functions.php have been changed
- Homemade plugin while using Themify Ultra
- Conditional attributes and logic per product category
- WordPress get_avatar function not correct working
- Which file of wordpress manage plugins functionalities?
- Difference and examples of esc_attr__() and esc_attr_e()
- Redirect to another page using contact form 7? [closed]
- List the authors that have written posts in a category
- How do I combine a theme with a plugin
- How to over-ride a file in a plugin? [closed]
- Overwrite category head title
- Check if variable is set in filter
- execute function after one completed
- Create custom pages with a plugin
- WordPress checkbox and Illegal string offset
- How to write “alt” tag in image for wordpress code?
- The function called on the wp head hook becomes null
- adding dynamic/multiple slug values in ‘option_none_value’
- Hide Plugin Custom Post Type Menu Link
- working code, not working – Plugin Dev
- how override a define
- Genesis Child Theme – Customize body
- Link custom post type to page
- Securing langugae folder
- when i activate my WordPress plugin cannot see customizer options or preview
- Plugin function in child theme
- How to prevent redoing get_posts queries and make results available to other scripts?
- Site is setup statically – how to make it content managable?
- Send email notification when meet the condition
- Can’t modify plugin function
- How to escape html code?
- Create WordPress category dynamically
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Issue with customizer and widget page
- Gravity Forms and Gravity View Permissions
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- wp_enqueue_script doesn’t load JS in plugin
- How to make content as required in custom post type?
- Shortcode cannot parse attributes within double quotes. ” is becoming ” breaking my shortcode
- Any plugin installation and update overwrite current theme
- Mixed results with is_page() WordPress function, when using $this, or self
- Read page- or post-content across different builder-plugins
- How to create new title and its description inside a section in WP Customizer?
- WooCommerce Checkout – Validate User Role
- I have issue to retrive post thumbnail with rest api
- Why nested REPLY not working in WP Comments?
- How to get next day date of a specific day
- Custom Plugin not Displaying in the Website Production environment (Divi)
- Custom page template from plugin does not work with pre-installed themes in WordPress 6.6.1