• 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

Add Widget Area to Home Page Only – Code Needed

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 › Add Widget Area to Home Page Only – Code Needed

This topic is: not resolved
  • This topic has 4 replies, 2 voices, and was last updated 12 years, 4 months ago by Brad Dalton.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 9, 2013 at 12:29 pm #10729
    TonySan1
    Member

    Hi to you all, I hope you are all doing well. I would like to know if someone could supply the correct code I would need to insert into my Genisis home page .php to call my registerd widget to the home page only.  I know how to register the new wigdet in the functions .php but I am stuck with what code I should use and exactly where to insert it in my home page .php.  Also the basic css. for a 600x400 widget area. Any help would be really appreciated. 🙂

    Thnk you

    TonySan1

    January 9, 2013 at 12:34 pm #10731
    Brad Dalton
    Participant

    Try this: http://www.briangardner.com/home-widget-area-eleven40/


    Tutorials for StudioPress Themes.

    January 9, 2013 at 2:27 pm #10775
    TonySan1
    Member

    Thank you for the information. I tried to use the code in the article and substituted some of the code with what I thought was needed. Unfortunately I got a Syntax error message. So I gusse I did something wrong. Could you give me an example of what the code would look like?  I would like the widgetized area to be 600 x 400 pix above the posts excerpts and below the nav bar. Here is the site URLhttp://internetbusinessmastery.info

    By the way Here is the code that i used . See anything wrong?

    /** Add the home above content slideshow */ add_action( 'genesis_before_loop', 'lifestyle' ); function lifestyle() {

    /** Do nothing on page 2 or greater */     if ( get_query_var( 'paged' ) >= 2 )         return;

    genesis_widget_area( 'home-above-content-slideshow', array(     'before' => '<div class="home-above-content-slideshow-widget-area">',     ) );

    January 9, 2013 at 9:45 pm #10864
    TonySan1
    Member

    Hi Guys I am still searching and looking for an answer to my question, so far I have been hitting brick walls. Maybe if I show you the code that I used to register my widget in the "functions .php" you can help me with the code to put in my Genisis "home page .php" so here it is:

    genesis_register_sidebar( array(
    'id'   => 'home-above-content-slideshow',
    'name'   => __( 'Home Above Content Slideshow', 'lifestyle' ),
    'description' => __( 'This is the sidebar above the content.', 'lifestyle' ),
    ) );

    Can anyone show me what code I need now to put in my home page .php to call my widget to the page?  I tried this but it did.'t work:

    /** Add the home above content slideshow */ add_action( ‘genesis_before_loop’, ‘lifestyle’ ); function lifestyle() {

    /** Do nothing on page 2 or greater */     if ( get_query_var( ‘paged’ ) >= 2 )         return;

    genesis_widget_area( ‘home-above-content-slideshow’, array(     ‘before’ => ‘<div class=”home-above-content-slideshow-widget-area”>’,     ) );

    February 9, 2013 at 5:57 am #19205
    Brad Dalton
    Participant

    Try this: http://pastebin.com/u/braddalton

    You can change the location to display the widget area content on the home page by changing the genesis hook


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 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