gregwhitworth
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Parent theme templates not working in child themeOk, figured it out. I was looking at the CODEX to see if it said anything after @esmi saying the theme wasn’t child-theme-friendly. And I saw this line:
Template. (required) directory name of parent theme, case-sensitive. NOTE. You have to switch to a different theme and back to the child theme when you modify this line.
At one point I read the ‘case-sensitive’ part so I changed this and forgot to refresh switch themes. I did this and now all templates are visible. Stupid mistake! Thanks guys!
Forum: Themes and Templates
In reply to: Parent theme templates not working in child themeOk, figured it out. I was looking at the CODEX to see if it said anything after @esmi saying the theme wasn’t child-theme-friendly. And I saw this line:
Template. (required) directory name of parent theme, case-sensitive. NOTE. You have to switch to a different theme and back to the child theme when you modify this line.
At one point I read the ‘case-sensitive’ part so I changed this and forgot to refresh switch themes. I did this and now all templates are visible. Stupid mistake! Thanks guys!
Forum: Themes and Templates
In reply to: Parent theme templates not working in child themeJust to explain it a little better as my last post is a little confusing, here is an example of my directory:
/wp-content/ /themes/ /parent/ ... other theme files are here ... template-liquid.php template-blog2.php template-magazine.php /child/ ... other theme files are here ... template-full-width.php
So when editing the page the only template in the drop down is Full Width. Thanks again for the help.
Forum: Themes and Templates
In reply to: Parent theme templates not working in child themeYes. Only from the child theme, very confusing. I have used other parent themes/ frameworks before and have never run into this problem. Now I am developing a more streamlined one for myself and am not sure what the issue is here.
Here is one of my templates:
<?php /** Template Name: Full Width */ update_option('current_page_template','temp-full-width'); get_header(); ?> <div id="primary"> <div id="content" role="main"> <?php the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> </div><!-- #content --> <div class="clear"><!-- --></div> </div><!-- #primary --> <?php get_footer(); ?>
One thing that I am curious that might be the problem is the get_template_part as those files reside within the parent theme. Not sure if that is indeed the problem but I am at my wits end with this.