footer.php in child theme not working
-
Hi
Hope someone can help me, newbie.. hahaI added a child theme to my theme and added the below to the footer.php, (code was copied from a previous comment from another user) but nothing happens when i upload this file to the site.. the problem i’m having is that if i add any type of code to this file it still has no effect?
the file is in the correct folder under: themes – customizr child – functions.php (using FileZilla for uploads)I still need to add my actual credits:-)
<?php /** add_filter('tc_credits_display', 'my_custom_credits'); function my_custom_credits(){ echo '<div class="span4 credits"> <p> · © '.esc_attr( date( 'Y' ) ).' <a href="'.esc_url( home_url() ).'" title="'.esc_attr(get_bloginfo()).'" rel="bookmark">'.esc_attr(get_bloginfo()).'</a> · Powered by <a href="http://my site name">My site</a> ·</p></div>'; } */The sites link Tazman
Many thanks in advance!
-
Hello,
it depends on the code you add, but for sure it replaces the parent footer.php, but the actual functions are in inc/parts/class-footer-footer_main.php
But I think there’s some confusion here, you talk about the file footer.php but then post the content of the child-thme functions.php …Anyway the code above should be put in the child-theme functions.php as you did, but you commented the code. The whole content of your child-theme functions.php should be, then:
<?php /* put all your functions below */ add_filter('tc_credits_display', 'my_custom_credits'); function my_custom_credits(){ return '<div class="span4 credits"> <p> · © '.esc_attr( date( 'Y' ) ).' <a href="'.esc_url( home_url() ).'" title="'.esc_attr(get_bloginfo()).'" rel="bookmark">'.esc_attr(get_bloginfo()).'</a> · Powered by <a href="http://my site name">My site</a> ·</p></div>'; }Hi
might have…
how blonde, haha, i placed this */ at the end of the coding instead of the top/* put all your functions below */
the code is working, thank you for the quick response!
hope u guys have a great dayGlad you solved Robin 😉
The topic ‘footer.php in child theme not working’ is closed to new replies.
