genesis footer editing

In standard WordPress themes, footer.php file contains the credits. But in Genesis and its child themes , the functions file does the part. Genesis renders the credits by using following action:

do_action( 'genesis_footer' );


Most of the times, the footer credits are automated and have the format like

© 2014. Gaurav Tiwari | Genesis Framework | Log In.

Certainly, a lot of Genesis users want to customize the credits according to their need but they don’t find a way to do so.

If you know how to edit WordPress themes from Dashboard, you can customize Genesis footer by writing single line of codes.

 

Step One:

  • Open Dashboard → hover over Appearance → click on Editor

Step Two:

  • Select Genesis child theme to edit.

 

 

 

Do not edit the parent files of Genesis Theme.

Screenshot_7

Step Three:

  • Open Theme functions (functions.php) file.

 

Screenshot_8

Step Four:

  • At the end of functions.php , enter
remove_action( 'genesis_footer', 'genesis_do_footer' );

This will remove the genesis footer.

Optionally, you can also hide the Genesis footer by writing the following CSS in style.css file:

.footer .wrap { display:none!important; }

Step Five:

  • Now if you want to write custom credits to footer, you can add an action by writing
add_action( 'genesis_footer', 'my_custom_footer' );

This action replaces default genesis_do_footer with your own my_custom_footer. At the end you will need to add a function to my_custom_footer which can echo your HTML code. It can be done by writing

function my_custom_footer() { 
echo '<p>&copy; Copyright 2014 <a href="http://gauravtiwari.org">Gaurav Tiwari</a> | Anything Else using simple HTML or PHP</p>'
}

So, the complete PHP code reads like:

< ?php remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'my_custom_footer' );
function my_custom_footer() {
echo'<p>&copy; Copyright 2014 <a href="http://gauravtiwari.org">Gaurav Tiwari</a> | Anything Else using simple HTML or PHP</p>'
}
?>

Alternatively, the same can be done by writing the function as

function my_custom_footer() { ?>  <p>&copy; Copyright 2014 <a href="http://gauravtiwari.org">Gaurav Tiwari</a> | Anything Else using simple HTML or PHP</p> }

Published by Gaurav Tiwari

A designer by profession, a mathematician by education but a Blogger by hobby. Loves reading and writing. Just that.

7 Comments

  1. Finally found your article with no credits in your code 😛

    Thank You.

    Reply
  2. Thank you for the great article. Love how you explained everything. Could you please tell me how I can delete the (Powered by Gb-rugs.com – Rugs & Carpets) at the very bottom of my homepage?

    I leave My website in the comment so you can check out and see better what I mean.
    Thanks again Gaurav Tiwari

    Reply
    • Dear Hamed. Under Appearance → Theme Editor in your Dashboard, please open

      footer.php

      and delete the code similar to this:

      < p style="text-align: center; font-size:10px">Powered by < a href="http://www.gb-rugs.com/index.asp?lang=uk" target="_blank">Gb-rugs.com - Rugs & Carpets</p>

      Hope this helps.

      Reply
      • Thank you Gaurav Tiwari, I followed the instructions but wasn’t able to find the the code above.

      • I request you to look upon the same by searching

        Gb-rugs.com - Rugs & Carpets

        inside footer.php, functions.php and index.php files respectively. If not found, I suspect there is a plugin interference or your database has been compromised.

  3. Gaurav Tiwari thank you very much for quick reply. Wasn’t able to located it. Probably plugin issue. I have another question if you don’t mind. If you look at the footer of my homepage, you will see a list. I’m trying to put them in a row instead of a column but can’t find the option to do so.
    Home
    Great links to check out
    In the media
    PR/Advertise
    Published articles

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *