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 #10046
What theme are you using?January 6, 2013 at 10:27 pm #10051
My own custom child theme based on the basic framework.January 6, 2013 at 10:55 pm #10060
If you haven’t added any other functions to move it, then that should work. Any plugins that may be altering things?January 6, 2013 at 11:12 pm #10066
I 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 #10071
Install the Genesis Simple Hooks Plugin http://wordpress.org/extend/plugins/genesis-simple-hooks/
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)
January 7, 2013 at 1:39 am #10075
I’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 #10078January 7, 2013 at 4:29 am #10081
Sorry 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 #10082
If 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.
January 7, 2013 at 5:23 am #10084
OK 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 #10131
What’s your url?January 7, 2013 at 6:19 pm #10226This reply has been marked as private.January 7, 2013 at 6:23 pm #10228
I 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 #10232
Genesis 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
The topic ‘Removing Footer’ is closed to new replies.