Removing Footer

Community Forums Forums Design Tips and Tricks Removing Footer

This topic is: resolved

This topic contains 17 replies, has 3 voices, and was last updated by  Jen Baumann 1 year, 11 months ago.

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #10042

    deconq
    Participant
    Post count: 17

    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.

    #10046

    Jen Baumann
    Keymaster
    Post count: 444

    What theme are you using?


    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

    #10051

    deconq
    Participant
    Post count: 17

    My own custom child theme based on the basic framework.

    #10060

    Jen Baumann
    Keymaster
    Post count: 444

    If you haven’t added any other functions to move it, then that should work. Any plugins that may be altering things?


    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

    #10066

    deconq
    Participant
    Post count: 17

    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.

    #10071

    braddalton
    Participant
    Post count: 10679

    Install 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)


    #10075

    deconq
    Participant
    Post count: 17

    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…

    #10078

    braddalton
    Participant
    Post count: 10679

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

    Resource


    #10081

    deconq
    Participant
    Post count: 17

    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?

    #10082

    braddalton
    Participant
    Post count: 10679

    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.


    #10084

    deconq
    Participant
    Post count: 17

    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?

    #10131

    Jen Baumann
    Keymaster
    Post count: 444

    What’s your url?


    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

    #10226

    deconq
    Participant
    Post count: 17
    This reply has been marked as private.
    #10228

    deconq
    Participant
    Post count: 17

    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?

    #10232

    Jen Baumann
    Keymaster
    Post count: 444

    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 :)


    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

Viewing 15 posts - 1 through 15 (of 18 total)

The topic ‘Removing Footer’ is closed to new replies.