In your context you use the wrong constant. You must use the constant STYLESHEETPATH
for the path to the active child theme. The constant TEMPLATEPATH
get the path to the parent theme, that was referenced in the child theme.
But, a important hint. The constant is deprecated, see the ticket #18298 for more information. That’s is the point that you should use the function get_stylesheet_directory()
to get the right path.
Additional also the hint, also the constant TEMPLATEPATH
is deprecated and also here the hint to use the associated function get_template_directory()
.
Related Posts:
- Is it possible to override the result of get_template_part()?
- Child Theme: how to override variables?
- roots child theme can’t override header.php
- Load template inside a parent template
- Updating modified templates
- Child theme template file will not load
- Checking for page templates in child theme
- Should template files be copied to the child theme for editing?
- Why does the Full-width Template in Twenty Twelve pack so many classes into the body class attribute?
- How to preserve changes in templates and other files
- Override Dokan Includes File in Child Theme
- lost css when overriding themes templates
- ACF costum date format [closed]
- What template is used for viewing Media Library Files?
- Page header on specific page is different from the rest [closed]
- Parent/Child themes – both CSS files loaded
- Child theme enqueueing style.min.css not style.css
- How can I make custom page templates work on child theme?
- Why would adding a template file to a child theme cause an error in template-loader.php?
- WordPress Child Theme Template auth_redirect wrapper
- How can I add some blocks to template without changing template file?
- custom template – override plugin template in child theme – issue with scripts
- Unload templates; disable parent Template Parts using only “theme.json”
- Where is get_header(‘shop’) file in Woocommerce templates
- WP frontend output of custom textarea fields not respecting line breaks. In admin it’s OK
- Custom reset password template after forgot password request
- How to create tag.php
- Get template part vs locate template function
- Tools for Converting an Existing Website Design to a WordPress Template?
- author.php added to template not working on Nginx server
- wordpress – load a template based on the URI
- How to include template according to meta post value
- Using Includes in Templates in Document Head
- How to show scaled featured image in template?
- How to check active theme is parent or child wordpress
- How does wordpress blocks?
- Which has more impact on site performance? Template overrides or hooks
- Subpage template
- Advanced Custom Fields – display when specific template used?
- What should I put on my index.php?
- How To Create WooCommerce Custom Template For Specific Product?
- How to Use Twig + Timber with Multiple Loops based on Meta Key Value
- Programatically create a page
- Missing .twig files in wordpress theme editor
- How to custom page template for the Gutenberg editor
- Use PHP templates as blocks
- Directly using pure JWPlayer JS (but NOT WP Plugin)
- Templates have disappeared from drop down lists
- Login page theming?
- I want to add a custom “all posts by author” by authors name. How?
- Advanced templating / WordPress as a CMS questions
- Redirect template based on permalink rather than $wp_query
- displaying category and subject posts
- How to duplicate a page template but make minor changes to the header?
- Custom template bypassing to pager to index.php
- Custom templates vs page-slug
- get_template_directory() still returning path to previous theme
- URL / Templating system advice [closed]
- What’s the purpose of $wp_did_header?
- Trying to display short code content in template file with do_shortcode()
- Unable to add template to page set as Posts page in WP V 4.6.1
- How to use index.php as a template for archives?
- How to customize WooCommerce templates to avoid override upon update [closed]
- Creating new content types (Pages, posts, testimonials, tigers, oh my!)
- Dynamically Insert Image Into Stylesheet
- How to access .html file that’s located in the theme folder from the browser?
- Way to use one template but be able to call different top graphics?
- Differnt page template for page 2 of blog feed
- Why still output /wp-content/themes/twentynineteen?
- How to implement my custom development multiple PHP page work into WordPress?
- Create template for just a print
- dynamic_sidebar() stopped working
- Index template always follows page_template() template?
- WP overwrites my setup_postdata() setup
- wp_list_authors() returning the wrong member url
- Sending email for the custom form in WordPress
- Hard Coding Components on a Client Specific Websites
- How to use another file instead of home.php
- Assigning custom page templates to a static blog page
- Can i exclude certain page templates for a specific role?
- Template_redirect for child custom post types
- How to create a archive template for custom post type [duplicate]
- Using a specific template for front page only
- Exclude certain template from wp_list_pages
- Why wordpress custom template comments shows Undefined index?
- How to add variables to a template
- Update body class based on theme as well as a html attribute
- Is it possible to set a custom post type template with code?
- Fix for Chart.js removing Admin Bar
- Why is this array not working?
- Single Post Templates Doubt
- strange behaviour of template_redirect in IE8
- How do i load a different template for different users screen width
- MailPress plugin: table inline style tag removed when sending the newsletter
- Custom Archive with Content for Custom Post Type
- Overwrite template-tags.php in child theme
- Display random page
- Implement HEAD and TITLE tags with DB DATA
- Custom Post Type Trouble
- files disappearing from template