• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Removing Footer

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Removing Footer

This topic is: resolved

Tagged: footer, functions.php, hook, html

  • This topic has 17 replies, 3 voices, and was last updated 10 years, 1 month ago by Jen Baumann.
Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • January 6, 2013 at 10:11 pm #10042
    deconq
    Member

    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
    Jen Baumann
    Participant

    What theme are you using?

    January 6, 2013 at 10:27 pm #10051
    deconq
    Member

    My own custom child theme based on the basic framework.

    January 6, 2013 at 10:55 pm #10060
    Jen Baumann
    Participant

    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
    deconq
    Member

    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
    Brad Dalton
    Participant

    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)


    Get Help – Book Consultation.

    January 7, 2013 at 1:39 am #10075
    deconq
    Member

    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 #10078
    Brad Dalton
    Participant

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


    Get Help – Book Consultation.

    January 7, 2013 at 4:29 am #10081
    deconq
    Member

    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
    Brad Dalton
    Participant

    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.


    Get Help – Book Consultation.

    January 7, 2013 at 5:23 am #10084
    deconq
    Member

    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
    Jen Baumann
    Participant

    What's your url?

    January 7, 2013 at 6:19 pm #10226
    deconq
    Member
    This reply has been marked as private.
    January 7, 2013 at 6:23 pm #10228
    deconq
    Member

    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
    Jen Baumann
    Participant

    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 🙂

    January 9, 2013 at 9:44 pm #10863
    deconq
    Member

    Wait, what's the init line? I don't have that in my functions file.

    January 10, 2013 at 3:22 am #10892
    deconq
    Member

    I solved it, turns out the reason was because I didn't have an init line in my functions.php. I downloaded the Genesis sample child theme and copied the code from there into my file and the footer disappeared.

    January 10, 2013 at 7:29 am #10932
    Jen Baumann
    Participant

    I'm glad you resolved it!

  • Author
    Posts
Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Removing Footer’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble