• Resolved Robin 7

    (@pinecom)


    Hi
    Hope someone can help me, newbie.. haha

    I 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> &middot; &copy; '.esc_attr( date( 'Y' ) ).' <a href="'.esc_url( home_url() ).'" title="'.esc_attr(get_bloginfo()).'" rel="bookmark">'.esc_attr(get_bloginfo()).'</a> &middot; Powered by <a href="https://my site name">My site</a> &middot;</p></div>';
    }
    */

    The sites link Tazman

    Many thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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> &middot; &copy; '.esc_attr( date( 'Y' ) ).' <a href="'.esc_url( home_url() ).'" title="'.esc_attr(get_bloginfo()).'" rel="bookmark">'.esc_attr(get_bloginfo()).'</a> &middot; Powered by <a href="https://my site name">My site</a> &middot;</p></div>';
    }

    Thread Starter Robin 7

    (@pinecom)

    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 day

    Glad you solved Robin ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘footer.php in child theme not working’ is closed to new replies.