Support » Theme: Clean Retina » remove footer

  • Resolved epigrapisa

    (@epigrapisa)


    ‘ve done this:

    That’s a neat theme and very organized. But changing the copyright properly requires a little coding.

    First create a child theme for Clean Retina. Put the child theme’s style.css file in themes/clean-retina-child.

    /*
    Theme Name: Clean Retina Child Theme
    Author: Self-Help WordPress User
    Template: clean-retina
    */

    @import url(“../clean-retina/style.css”);
    The footer for that theme is added via this action in the parent theme:

    add_action( 'cleanretina_footer', 'cleanretina_footer_info', 25 );
    You want to remove that action and add your own instead. To do that in your child theme directory create a blank functions.php file and add these lines to it.

    <?php
    
    // Remove old copyright text
    add_action( 'init' , 'mh_remove_copy' );
    function mh_remove_copy() {
    remove_action( 'cleanretina_footer' , 'cleanretina_footer_info ', 25 );
    }
    
    // Add my own copyright text
    add_action( 'cleanretina_footer' , 'mh_footer_info' , 25 );
    function mh_footer_info() {
    $output = '<div class="copyright">'.'Copyright © [the-year] [site-link] Powered by: SUPER MARTIANS FROM MARS! '.'</div><!-- .copyright -->';
    echo do_shortcode( $output );
    }

    Which on your installation should produce something like

    Copyright © 2012 B .Dinelli for Hair Powered by: SUPER MARTIANS FROM MARS!
    You can read about adding and removing actions in child themes at this site.

    Using Action Hooks in WordPress Child Themes

    Hope that helps.

    But this code:

    <?php
    
    // Remove old copyright text
    add_action( 'init' , 'mh_remove_copy' );
    function mh_remove_copy() {
    remove_action( 'cleanretina_footer' , 'cleanretina_footer_info ', 25 );
    }

    doesn’t work, I mean it inserts my copyright, but still doesn’t remove the old one.

    Thanks

    [Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Sanjip Shah

    (@sanjiv-saha)

    Could you paste your all code of the child theme’s functions.php file.
    The code that you have pasted is okay, it should work to remove.

    <?php
    
    // Remove old copyright text
    add_action( 'init' , 'mh_remove_copy' );
    function mh_remove_copy() {
    remove_action( 'cleanretina_footer' , 'cleanretina_footer_info ', 25 );
    }

    Team Horse

    akedv

    (@ak71)

    didn’t work for me, both copyrights will be displayed!

    akedv

    (@ak71)

    using the code from the fourth posting at http://wordpress.org/support/topic/clean-retina-theme-horse-footer?replies=16 and putting it in child themes function.php did the trick, but the code seems to be identical, strange…

    namoras

    (@namoras)

    it’s the space behind cleanretina_footer_info on the line:
    remove_action( 'cleanretina_footer' , 'cleanretina_footer_info ', 25 );
    Correct line is:
    remove_action( 'cleanretina_footer' , 'cleanretina_footer_info', 25 );

    epigrapisa

    (@epigrapisa)

    thank you!

    designnutter

    (@designnutter)

    Thank you so much namoras, I was trying to solve this problem for the last few hours

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘remove footer’ is closed to new replies.