How to Edit or Remove Genesis Footer?

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.

 

Customizing Genesis Child Themes’ footer

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