WordPress.org

Support

Support » Themes and Templates » [Resolved] Remove or edit info in footer?

[Resolved] Remove or edit info in footer?

  • Hello,

    Love the theme and very interested in using it! Are we allowed to edit the info in the footer? And if so, how do we edit it? (Did not see where when looking at the stylesheet or footer.php).

    Thanks!

Viewing 15 replies - 1 through 15 (of 27 total)
  • Hi drewinator,

    You are allowed to edit the info in the footer but we would appreciate if you could keep link to us. If you want to change the info then all the information related to footer is located in footer-extensions.php you can create child theme and edit according to your need.

    Rabin

    Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    Rabin I haven’t looked lately at your theme but is there a way to do that that’s easy on the user? A similar question came up for Clean Retina a couple of months ago.

    http://wordpress.org/support/topic/clean-retina-theme-horse-footer?replies=16#post-3644112

    @drewinator from that earlier reply:

    First create a child theme for Attitude. Put the child theme’s style.css file in themes/attitude-child.

    /*
    Theme Name: Attitude Child Theme
    Author: Self-Help WordPress User
    Template: attitude
    */
    
    @import url("../attitude/style.css");

    The footer for that theme is added via this action in the parent theme:

    add_action( 'attitude_footer', 'attitude_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( 'attitude_footer' , 'attitude_footer_info ', 25 );
    }
    
    // Add my own copyright text
    add_action( 'attitude_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 © 2013 Drewinator 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.

    Check my work, there’s a lot of copy-pasta in this reply…

    Hi Jan Dembowski,

    Currently we don’t have such options to edit the footer info directly. We are thinking on it. The way you have pointed above is currently the best way to achieve this.
    Thanks for the detail description. 🙂

    Rabin

    Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    It looks like your theme already supports useful tags such as [the-year], [site-link], etc. Personally I think that would be a killer update to your themes. 😉

    Hi there,

    I know this post says it’s “resolved,” but I still can’t seem to get it to work. If I create a functions.php file and copy-and-paste the code that’s listed above, the only thing that ends up happening is that I can add a line that has the year for copyright, and my site’s link. I can’t actually delete anything that’s there – the stuff that is added ends up above the copyright/site link/citation that was there before. I hate to beat a dead horse, but… does anyone have any other suggestions for getting this to work? It also appears that there is a line break on my page between “Powered” and “by: WordPress.” How can I fix this in my child theme?

    Thanks!

    Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    It’s resolved because the OP or the theme author marked the topic as resolved. It’s often more helpful to start your own topic, which theme are you using? Can you provide a link to your site?

    If you are using the same Attitude theme then please start your own topic.

    http://wordpress.org/support/theme/attitude#postform

    Thinking it was the theme author/was not me. I very much appreciate the input/banter in this thread (and thanks in particular to you Jan for the suggested solution!). As it stands…

      -Attitude is a great free theme
      -Attitude would be worth paying for
      -My need to remove the copyright would be worth paying for
      -My current workload/necessity does not warrant the steps needed to remove the copyright in the free theme
      -My project does not warrant paying for a theme (just testing several out at this point)

    Thanks Rabin / thanks again Jan!

    Hello,
    I am using attitude as my theme, I want to change my footer tex. I did copy-and-paste the code that’s listed above and it print the exact footer I want. the problem is that it doesn’t remove or delete the old footer! right now I have 2footers, mine and the old one next to it! Can anyone assit please?

    Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    I did copy-and-paste the code that’s listed above and it print the exact footer I want.

    That’s good.

    the problem is that it doesn’t remove or delete the old footer! right now I have 2footers

    Not so good. I may have munged this part

    // Remove old copyright text
    add_action( 'init' , 'mh_remove_copy' );
    function mh_remove_copy() {
    	remove_action( 'attitude_footer' , 'attitude_footer_info ', 25 );
    }

    I’ll check it in 9 hours or so when I get back home. It’s not a hard action to remove so maybe someone else will chime in before then. 😉

    Hi Jan!
    I’ve been waiting for feed back, my question was “I want to change my footer tex. I did copy-and-paste the code that’s listed above and it print the exact footer I want. the problem is that it doesn’t remove or delete the old footer! right now I have 2footers, mine and the old one next to it! Can anyone assit please? ” or is there someone else who have an idea? your help is very apprecited. Thank you.

    Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    Ha! Found it. Try this functions.php in your child theme. It was the init hook.

    <?php
    
    // Remove old copyright text
    add_action( 'init' , 'mh_remove_copy' , 15 );
    function mh_remove_copy() {
            remove_action( 'attitude_footer', 'attitude_footer_info', 30 );
    }
    
    // Add my own copyright text
    add_action( 'attitude_footer' , 'mh_footer_info' , 30 );
    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 );
    }

    Edit: Also? Don’t bump your topic again, I was busy. 😉

    Hi!
    Biiiiig thanks, I works! 🙂
    Thank you Jan for your help, I really do appreciate it.
    🙂

    Awesome! Thanks so much! This works much better.

    Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    A bit late for me to reply but I’m glad to help. 😉

    Thanks…. its working good…..

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘[Resolved] Remove or edit info in footer?’ is closed to new replies.