WordPress.org

Ready to get started?Download WordPress

Forums

Clean Retina
[resolved] remove footer (7 posts)

  1. epigrapisa
    Member
    Posted 1 year ago #

    '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.

    http://themeshaper.com/2009/05/25/action-hooks-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.]

  2. Sanjiv
    Member
    Posted 1 year ago #

    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

  3. akedv
    Member
    Posted 1 year ago #

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

  4. akedv
    Member
    Posted 1 year ago #

    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...

  5. namoras
    Member
    Posted 1 year ago #

    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 );

  6. epigrapisa
    Member
    Posted 1 year ago #

    thank you!

  7. designnutter
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.