Minimum – Rendering 3 Footer Widgets on Homepage Only

Community Forums Forums Design Tips and Tricks Minimum – Rendering 3 Footer Widgets on Homepage Only

This topic is: resolved

This topic contains 4 replies, has 2 voices, and was last updated by  eluviis 1 year, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #38837

    eluviis
    Participant
    Post count: 115

    On Minimum – the 3 footer widgets that are not used on the demo site. Is it possible to only display them on the homepage and not the rest of the site?

    #38898

    Marco
    Participant
    Post count: 63

    Hello,

    I’d rather add 3 brand new footer widgets on home page and comment in functions.php the
    `add_theme_support( ‘genesis-footer-widgets’, 3 );`

    You could also hide/show them via .css.


    #38940

    eluviis
    Participant
    Post count: 115

    @Marco – Not sure I fully understand. Why add 3 band new widgets if I’m not using the stock 3 widgets yet. Am I missing something.

    I want to use those 3 widgets, but what I will display on them I only want on the homepage and nowhere else. Can I just modify the PHP that displays those widgets with a conditional rule or something? (I’m not a PHP expert).

    Like… this is the code in functions.php that seems to add those 3 widgets:

    /** Add support for 3-column footer widgets */
    add_theme_support( ‘genesis-footer-widgets’, 3 );

    Now, what would I need to do to it to tell it to only display on the homepage? Like, “if is home” or something like that?

    Thanks, Danny

    #39042

    Marco
    Participant
    Post count: 63

    Hello,

    copy this on functions.php just below the
    `add_theme_support( ‘genesis-footer-widgets’, 3 );`

    [php]
    function home_footer_widgets() {

    if ( !is_home() ) {

    remove_action( ‘genesis_before_footer’, ‘genesis_footer_widget_areas’ );
    }
    }
    add_action( ‘genesis_before_footer’, ‘home_footer_widgets’,1 );
    [/php]


    • This reply was modified 1 year, 2 months ago by  Marco.
    • This reply was modified 1 year, 2 months ago by  Marco.
    #40388

    eluviis
    Participant
    Post count: 115

    @Marco – Just got back to take care of this. Been quite busy.

    That worked GREAT! Thank you very much!

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Minimum – Rendering 3 Footer Widgets on Homepage Only’ is closed to new replies.