Community Forums › Forums › Design Tips and Tricks › Removing Footer
Tagged: footer, functions.php, hook, html
This topic contains 17 replies, has 3 voices, and was last updated by Jen Baumann 5 months, 1 week ago.
-
AuthorPosts
-
January 6, 2013 at 10:11 pm #10042
I am trying to completely replace my footer with a custom one. This line of code, recommended in the code snippets page:
remove_action( 'genesis_footer', 'genesis_do_footer' );I put that line of code into my functions.php file, but it doesn’t remove the footer like it should be doing. I can add in a new custom footer with add_action, but it just puts it on top of the existing footer without removing it.
Any ideas for why the code isn’t working? Everything else in my functions.php file works fine.
January 6, 2013 at 10:18 pm #10046What theme are you using?
Jennifer “Hermione” Baumann | Recommended StudioPress Developer
Dream Whisper Designs | Themessence | @dreamwhisper | If I’ve helped, like me on FacebookJanuary 6, 2013 at 10:27 pm #10051My own custom child theme based on the basic framework.
January 6, 2013 at 10:55 pm #10060If you haven’t added any other functions to move it, then that should work. Any plugins that may be altering things?
Jennifer “Hermione” Baumann | Recommended StudioPress Developer
Dream Whisper Designs | Themessence | @dreamwhisper | If I’ve helped, like me on FacebookJanuary 6, 2013 at 11:12 pm #10066I deactivated all my plugins and the default footer’s still there. I also tried creating a new blank child theme with that function call, looked at the live preview, footer was still there.
January 7, 2013 at 12:56 am #10071Install the Genesis Simple Hooks Plugin http://wordpress.org/extend/plugins/genesis-simple-hooks/
and find:
genesis_footer Hook
This hook, by default, outputs the content of the footer (inside the #footer div).
Unhook genesis_do_footer() function from this hook? (Unhook this function to remove your footer)
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.January 7, 2013 at 1:39 am #10075I’m an advanced user, I don’t need a bloated plugin. A plugin is just code after all, so surely I’d be able to achieve the same effect by writing the code myself in functions.php. Only I can’t…
January 7, 2013 at 2:35 am #10078/** Customize the entire footer */
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'custom_footer' );
function custom_footer() {
?>
© Copyright 2012 My Domain · All Rights Reserved · Powered by WordPress · Admin
<?php
}
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.January 7, 2013 at 4:29 am #10081Sorry to be rude Brad but judging by that ‘solution’ it looks like you haven’t even read my original post.
Jen, do you have any ideas?
January 7, 2013 at 5:01 am #10082If you installed the Simple Hooks plugin you can remove the footer and then use the code to customize your own.
I tested this and it works.
The code comes from StudioPress and so does the plugin.
WordPress Developer & Consultant
Brad Dalton @ WP Sites – Click Here to Get Genesis Child Theme Tips Delivered.January 7, 2013 at 5:23 am #10084OK I tested the plugin and it worked, but I’d still rather not have to install a bloated multi-purpose plugin where I should be able to accomplish the same thing with a single line of code in functions.php.
If the plugin works for me, then why doesn’t the function call work for me? I guess my question now is – what code is the plugin using to remove the footer?
January 7, 2013 at 10:19 am #10131What’s your url?
Jennifer “Hermione” Baumann | Recommended StudioPress Developer
Dream Whisper Designs | Themessence | @dreamwhisper | If I’ve helped, like me on FacebookJanuary 7, 2013 at 6:19 pm #10226Well I’ve been doing this on a local copy of WordPress actually, although the website it’s intended for is http://www.codeconquest.com. And I did also test it quickly on the live site and experienced the same problem.
January 7, 2013 at 6:23 pm #10228I was wondering, perhaps the reason the plugin works but functions.php doesn’t is because my child theme code gets run before the Genesis code is, so effectively I remove the footer before it’s even added and then Genesis adds it back in. Whereas in a plugin the plugin code gets run after the theme code? Does that sound right?
But then that raises the question, why does the functions.php code seem to work for other users but not me?
January 7, 2013 at 6:36 pm #10232Genesis code needs to run before the child theme can. Unless you are putting the footer code before the init line. It should just go toward the bottom.
When you tested on the live site, did you disable total cache? Your footer is in the right location for this to work, that’s why I wanted a url

Jennifer “Hermione” Baumann | Recommended StudioPress Developer
Dream Whisper Designs | Themessence | @dreamwhisper | If I’ve helped, like me on Facebook -
AuthorPosts
The topic ‘Removing Footer’ is closed to new replies.