How to Add a Home Widget Area to the eleven40 Theme

Recently over at StudioPress we released the eleven40 Theme, which pretty clearly took inspiration from the custom theme I use here. A few folks have asked if there was a way to add a widget area on the homepage of that theme.

Lucky for you, it’s actually quite easy to pull off.

Registering the Widget Area

The first thing you’ll want to do is open up the eleven40′s functions.php file and scroll to the bottom where you’ll see the /** Register widget areas */ note.

After that, go ahead and place the following code below – this will register another widget area called Home Featured.

genesis_register_sidebar( array(
    'id' => 'home-featured',
    'name' => __( 'Home Featured', 'eleven40' ),
    'description' => __( 'This is the home featured section.', 'eleven40' ),
) );

Hook the Home Featured Widget Area

Next, you’ll want to open up the eleven40′s home.php file and place the code below directly after the opening <?php tag:

/** Add the home featured section */
add_action( 'genesis_before_loop', 'eleven40_home_featured' );
function eleven40_home_featured() {

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

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

}

The function above will hook the Home Featured widget are just before the loop, which is at the top of the content area on the homepage.

Throw in a Little CSS Styling

Since I’m not a fortune teller, I can’t see into the crystal ball of all use-cases with this tutorial. However, I’ll give a little direction here.

If you plan to use the Home Featured widget area for a text widget, then you might want to add some CSS like this:

.home-featured {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 25px;
}

Email Newsletter

Like what you read here in this blog post?
Get more like it delivered to your inbox daily.

Comments

  1. says

    Brian, thanks I was wondering this exact thing. Let me ask you is it possible to add a home page similar to the Agency Theme to this theme? Any suggestions on doing something like that?

    • says

      Charlie – good to hear you were looking for something like this. As for the Agency homepage, yes it is possible (pretty much anything in Genesis is.) It would require additional coding, which pretty much means custom stuff. With eleven40 being wider and responsive, it makes it a bit more difficult.

  2. says

    This is pretty much another solution to have the Page Title widget showing only on the Homepage. In fact you won’t use the Page Title widget in eleven40 but this Home Featured Widget…am I right?

  3. says

    Thanks Brian
    Has anyone set it up yet?
    Would love to see a screenshot of what it looks like.

    Slowly getting into the idea of Register and then Display for these widgeted areas.

  4. says

    This is absolutely brilliant idea! So now you’ve got two custom widget areas on Homepage for this theme. I like that.
    I’ve used this eleven40 to be my first test theme on my site and I’d like to make the most out of it. I love the typography…but I’d like to customize it a bit.

  5. says

    Hi ~

    This works great! But I am still seeing the old homepage content at the end of the new widget content — is there a way to disable to old content showing below the new homepage widget?

    Thanks and thrive…

    Valery ~

  6. Eamon says

    Thanks for this, about to download the theme once I can find it (just upgraded). One thing I noticed is that your website is suddenly not rendering properly on my smart phone. Your posts are all one screen width to the right of your heading.

      • Eamon says

        I’m using a HTC Desire S. Right-hand rendering is only happening on ‘subscribe’ and ‘themes’ page now – just checked. The headings of both pages show as usual but I need to scroll right to find all the content. Hope that helps.

  7. says

    Hot damn. First I need Pinterest for a client theme and it’s there, and literally two days ago saw I needed a widget area for eleven40 and Voila!

    If you don’t stop we’ll have to add you to the payroll.

  8. says

    I live for these widgets. They just make things so much easier. This site has used so many Studiopress themes what’s 1 more? Cool theme, added the widget….now can we add 2 below like Lifestyle?

  9. says

    Hi Brian,

    I have loved and followed your work for a long time. I just installed this theme on my blog and have a couple of questions. How do I format my home page posts to look like yours? Also, what do you use for the cool circular navigation structure (1,2 … Next Page). Thanks for your help and thanks again for all your hard work over the years.

    Randy

    • says

      Hey Randy – thanks so much. Couple things:

      1. Homepage looking like mine – not following, can you explain in more detail? Yours is formatted the same way mine is.

      2. If you go the Genesis > Theme Settings page, and head to the Content Archives section, select Numeric for the Post Navigation Technique.

      • says

        Hi Brian.

        My apologies for not being specific. All the tags show up on my home page posts and I only want them to show up on the individual post pages. I am a little embarrassed about not figuring out the numeric navigation option but won’t be surprised if the tags question isn’t just as easily answered.

        Thanks for taking the time to respond.

        - Randy

  10. Mike says

    Great Job Brian! One question though…but you knew that was coming…

    I’m using the 3-column content column classes and would like the homepage to only display this new widget without the blog entries showing up beneath. Just the three columns of content.

    I suspect its in the functions.php file but not quite sure how to do it.

    Thanks again for a great theme! ;-)

  11. Jim says

    So after much struggling and big time help from the Studiopress support forum, I manged to create an eleven40 home page with a slider and widgeted areas much like in the Associate theme.

    I created the home featured widgeted area as described above and placed genesis slider in the spot, set the page to full width and added three widgeted areas under the slider. I added two widgeted areas under those three (which I am not using at the moment).

    The question is, is there any way to make this page mobile responsive or is that just asking too much of responsive design?

    Here’s the site – http://bit.ly/wtEB60

    Please excuse that it looks so much like this site. At the moment it is only a test site. I am waiting on a logo, color scheme and images for the slider from my designer. Only testing top nav menu at the moment also.

    The question now, is there any way to make this home page responsive?

    • Jim says

      Wait…I just clicked on the 1140 CSS grid link at the top of the page. I’m guessing that if I go back and change my layout to match the grid above, that should take care of the mobile responsive needs?

      • says

        The 1140 CSS Grid is actually something I’ve been playing with and is not used on the eleven40 theme. As of right now, it’s something I’m playing with before it’s deployed on any of the StudioPress themes.

      • Jim says

        Thanks Brian. The slider is actually working on the iPad. Doesn’t on the iPhone though. Looking forward to plugin.

    • Jim says

      I don’t know if Brian wants me to share the code here in the comments nor I’m I sure I did it the best way. I’m also having trouble getting it spaced properly. If you look you can see that they aren’t quite even and the right widget doesn’t look right on iPhone/iPad. I think that has something to do with being set float right but I’m not sure (and I welcome suggestions).

      I used the process above to create the featured section for the slider than basically built three more sidebars to go under the slider using a customized code from the Studiopress Associate child theme which uses a similar layout.

      Feel free to dig through the site using Firebug.

  12. Jim says

    O.K. So I added this to my custom template.php

    /*******add home featured**********/
    genesis_register_sidebar( array(
        'id' => 'home-featured',
        'name' => __( 'Home Featured', 'eleven40' ),
        'description' => __( 'This is the home featured section.', 'eleven40' ),
    ) );
    
    genesis_register_sidebar( array(
    	'id'			=> 'page-title',
    	'name'			=> __( 'Page Title', 'eleven40' ),
    	'description'	=> __( 'This is the page title section.', 'eleven40' ),
    ) );
    genesis_register_sidebar( array(
    	'id'			=> 'after-post',
    	'name'			=> __( 'After Post', 'eleven40' ),
    	'description'	=> __( 'This is the after post section.', 'eleven40' ),
    ) );
    
    /*****add middle and bottom home page widget area*********/
    genesis_register_sidebar( array(
    	'id'			=> 'home-middle-1',
    	'name'			=> __( 'Home Middle #1', 'eleven40' ),
    	'description'	=> __( 'This is the first column of the home middle section.', 'eleven40' ),
    ) );
    genesis_register_sidebar( array(
    	'id'			=> 'home-middle-2',
    	'name'			=> __( 'Home Middle #2', 'eleven40' ),
    	'description'	=> __( 'This is the second column of the home middle section.', 'eleven40' ),
    ) );
    genesis_register_sidebar( array(
    	'id'			=> 'home-middle-3',
    	'name'			=> __( 'Home Middle #3', 'eleven40' ),
    	'description'	=> __( 'This is the third column of the home middle section.', 'eleven40' ),
    ) );
    genesis_register_sidebar( array(
    	'id'			=> 'home-bottom-1',
    	'name'			=> __( 'Home Bottom #1', 'eleven40' ),
    	'description'	=> __( 'This is the first column of the home bottom section.', 'eleven40' ),
    ) );
    genesis_register_sidebar( array(
    	'id'			=> 'home-bottom-2',
    	'name'			=> __( 'Home Bottom #2', 'eleven40' ),
    	'description'	=> __( 'This is the second column of the home bottom section.', 'eleven40' ),
    ) );

    You can see that I’ve added a two column bottom section to go below the three showing but I’m not using them. I haven’t styled them either.

    Then on the home.php:

    /** Remove default sidebar go full width content */
    add_filter('genesis_pre_get_option_site_layout', 'custom_home_layout');
    function custom_home_layout($opt) {
        if ( is_home() )
        $opt = 'sidebar-content-sidebar';
        return $opt;
    }
    
    
    
    /** Add the home featured section */
    
    add_action( 'genesis_before_loop', 'eleven40_home_featured' );
    function eleven40_home_featured() {
    
        /** Do nothing on page 2 or greater */
        if ( get_query_var( 'paged' ) >= 2 )
            return;
    
        genesis_widget_area( 'home-featured', array(
        'before' => '<div class="home-featured widget-area">',
        ) );
    
    }
    
    
    /*******add middle home widgets**********/
    add_action( 'genesis_before_loop', 'eleven40_home_middle' );
    function eleven40_home_middle() {
    
    	/** Do nothing on page 2 or greater */
        if ( get_query_var( 'paged' ) >= 2 )
            return;
    
    
    echo '<div class="home-middle">';	
    	
    	if ( is_active_sidebar( 'home-middle-1' ) ) {
    		echo '<div class="home-middle-1">';
    		dynamic_sidebar( 'home-middle-1' );
    		echo '</div><!-- end .home-middle-1 -->';
    	}
    	
    	if ( is_active_sidebar( 'home-middle-2' ) ) {
    		echo '<div class="home-middle-2">';
    		dynamic_sidebar( 'home-middle-2' );
    		echo '</div><!-- end .home-middle-2 -->';
    	}
    	
    	if ( is_active_sidebar( 'home-middle-3' ) ) {
    		echo '<div class="home-middle-3">';
    		dynamic_sidebar( 'home-middle-3' );
    		echo '</div><!-- end .home-middle-3 -->';
    	}
    	
    echo '</div><!-- end .home-middle -->';
    
    /*********add middle bottom widgets*********/
    echo '<div class="home-bottom">';
    	
    	if ( is_active_sidebar( 'home-bottom-1' ) ) {
    		echo '<div class="home-bottom-1">';
    		dynamic_sidebar( 'home-bottom-1' );
    		echo '</div><!-- end .home-bottom-1 -->';
    	}
    	
    	if ( is_active_sidebar( 'home-bottom-2' ) ) {
    		echo '<div class="home-bottom-2">';
    		dynamic_sidebar( 'home-bottom-2' );
    		echo '</div><!-- end .home-bottom-2 -->';
    	}
    	
    	echo '</div><!-- end .home-bottom -->';
    	
    }
    
    /*********end middle home widgets*********/
    
    
    
    
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    
    genesis();

    and finally on the Stylesheet:

    /*********home middle and bottom widgets*********/
    /* Home Middle
    ------------------------------------------------------------ */
    
    .home-middle {
         margin: 0 auto;
         overflow: hidden;
         margin-top:20px;
        
        
    }
    
    .home-middle-1 {
         float: left;
         margin: 0 22px 0 0;
         width: 180px;
    }
    
    .home-middle-2 {
         float: left;
         width: 180px;
    }
    
    .home-middle-3 {
         float: right;
         width: 180px;
    }
    
    
    /* Home Bottom
    ------------------------------------------------------------ */
    
    .home-bottom {
         margin: 0 auto;
         padding: 0 0 25px;
        
    }
    
    .home-bottom-1 {
         float: left;
         width: 598px;
    }
    
    .home-bottom-2 {
         float: right;
         width: 287px;
    }
    
    /********end middle bottom widgets mod***********/

    I have to thank Andrea in the support forum for her patience and help getting me through this. I have learned everything I know about html from cut and paste/trial and error. If anyone has any tips to clean it up or make it work better, please let me know.

    While I’m at it, I’d like to put different content in the left/right side bars on the home page (and possibly interior pages) than on the blog. I’m about to dive in to this tutorial to see if I can get it to work: http://dreamwhisperdesigns.com/genesis-tutorials/load-sidebar-specific-pages/

    Is that the best way or is there an easier method?

        • says

          I love Genesis Simple Sidebars, it’s just amazing to be able from within the post dashboard to be able to display whatever sidebar you like.
          I’m not a WP expert but I was wondering if you would be able to add widgets in the same fashion as you can add custom sidebars to your theme: top and bottom of posts.

  13. says

    Brian, what’s the use for the Home Widget area above the main content? I’d be more interested to add one for the rest of pages EXCEPT for the Homepage, same like the bottom of post widget. Can you do that?

  14. says

    I hadn’t logged into Genesis for a while and today noticed this new theme. Great theme and thanks for the info on how to modify. I like how you make things detailed and easy. Keep up the good work!

  15. says

    Brian,
    This theme is really nice man. I am planning on using it on a blog shortly. Can you tell me how you would recommend adding an opt in widget similar to the Generate theme to eleven40? It sounds like you are talking about that here but I am pretty new to working with any custom code. Thanks.
    Josh

  16. says

    Hi Brian,
    I have just updated my test site (not the site above) with the featured home widget, which is perfect. However, it still shows the old post content below. Is there any way to prevent this from showing the original post content. I like the idea of showing stacked posts. PS I love this eleven40 design.
    cheers
    Rod

  17. Bill Valentine says

    Hi Brian,
    I’m a Genesis Pro member and do all of my development in your themes.

    I’m starting a few new projects and would like to use a responsive theme, but my clients want a format more akin to the Enterprise or Agency themes. Do you have a schedule for rolling out more Genesis themes with responsive designs. And can I vote for your to prioritize Enterprise or Agency. Thanks

  18. Bill Valentine says

    Hi Brian,

    Got it, installed it. I was hoping to be able to display images from either the media library or a gallery. Is that not an option?

    • says

      Not with this slider – this one merely pulls in the latest X number of posts with associated featured image.

      We’re working on another plugin, that will be more like an image slider, independent of posts/pages. More to come.

  19. says

    Hey Brain,

    I’m using your theme for a WPMU site and using sub-directory structure. When adding your code to the home.php it’s evident that it doesn’t consider website.com/subdirectory as “home” even though it’s the home for that part of the site. What’s the trick to have the widget to allow for each sub-directory to have a widget where I could add a slider or whatever?

    • says

      Hey Chad – that shouldn’t present an issue. As long as you are using the multi-site setup for WordPress, and the code as mentioned is placed into the home.php file of the child theme each separate site that has a homepage widget area should be showing it.

  20. says

    Hi all,
    Is there any way I can feature a page or slider on the eleven40 homepage and NOT show any posts? Any code or hooks for that? Thanks!

  21. says

    Never mind – figured it out using this comment thread:
    http://www.studiopress.com/support/showthread.php?t=90370&highlight=homepage

    My code for home.php is now this (also includes a snippet that allows me to add a slider):
    = 2 )
    return;

    genesis_widget_area( ‘home-featured’, array(
    ‘before’ => ”,
    ) );

    }

    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );
    /* add_action( ‘genesis_loop’, ‘eleven40_grid_loop_helper’ );
    /** Add support for Genesis Grid Loop */
    /* function eleven40_grid_loop_helper() {

    if ( function_exists( ‘genesis_grid_loop’ ) ) {
    genesis_grid_loop( array(
    ‘features’ => 1,
    ‘feature_image_size’ => 0,
    ‘feature_image_class’ => ‘alignleft post-image’,
    ‘feature_content_limit’ => 0,
    ‘grid_image_size’ => ‘grid-thumbnail’,
    ‘grid_image_class’ => ‘alignnone’,
    ‘grid_content_limit’ => 250,
    ‘more’ => __( ‘[Continue reading]‘, ‘genesis’ ),
    ‘posts_per_page’ => 5,
    ) );
    } else {
    genesis_standard_loop();
    }

    } */

    genesis();

  22. says

    Thanks for the widget, Brian. StudioPress has been a great investment for me.

    I used the code Jim shared above to make three floating widgets. You can see at http://jaredsasser.com. Three widgets are ‘Marketing Plan’, ‘Website Review’, and ‘Copywriting.’ I can’t get them to ‘float’ however, so they are left to right. I know it’s a simple thing, but I’m not a CSS guy, so any help you can give me to fix is appreciated.

  23. says

    I love the new eleven40 theme that you created. I am having a difficult time figuring out how to add the blog title to the solid colored rectangular box (title area) at the top of the page. There appear to be no widgets for this or any theme areas dedicated to this (of course, I am very new to WordPress & have but a rudimentary knowledge of html and CSS).
    Thanks in advance, MJ

  24. Anton says

    Brian,

    Thanks for posting this tutorial, it’s really helpful.

    I was able to change this widget to appear after the posts by editing it to read:

    add_action( ‘genesis_after_loop’, ‘eleven40_home_featured’ );

    But my quesion is, is there a way to sandwich this widget below the first post and just above the 2nd and 3rd posts? I want to add some social share icons to that area.

    Thanks!

    • says

      There’s a probably a way to do this – but it would require hijacking the loop on that particular page and is something I really don’t know how to do.

  25. Ziad says

    Hi Brian,

    I would extremely appreciate that you help me out in something that I don’t seem to get it right for a reason I totally ignore.

    The navigation menu on the Eleven40 Theme which is HOME -SAMPLE -LAYOUTS -TEMPLATES – COLUMNS – COLORS – CONTACT all seem perfectly in place but when I try to add pages on my theme and link them to the menus they seem out of place! They are not being displayed properly along the black header strip but they show only beneath the header under the orange section corresponding to the blog title dynamic text! Appreciate any help you could provide me with to solve this out!

    Thank you!

    Ziad

    • says

      Those links are actually the custom menu widget in the Header Right widget area. (and the demo does not have the primary/secondary navigation menus enabled.)

  26. says

    Is there a way to do this same thing (add a genesis slider to the home widgeted area) in the new studiopress decor theme? Any help would be greatly appreciated : )

  27. says

    Hi Brian,

    My eleven40 blog has a slight issue which I can’t figure out.

    How can I set the number of featured posts per page?

    In the middle layout on my homepage, I have the most recent post at the top and 4 featured posts below it. However I would prefer to have the most recent as it is but add to the four below another 2 to make them 6 featured posts in total in addition to most recent main post.

    Now if you go to page 2, you can see 5 featured posts and there is one blank space which doesn’t make my page look good. How can I fill in this space with another featured post? As to make page 2, 3, 4, …upwards all have 6 featured posts in total per page?

    Please note that I am referring here to the featured posts in the mid column of my blog and not the sidebars.

    Looking forward to any assistance you can provide me on the above.

    All the best,
    Ziad

      • says

        Hi Brian,

        Thanks for your reply. Unfortunately i have changed the home.php in eleven40 theme from 5 to 6 posts and i made sure both are set to 6 in genesis theme settings and reading settings. But still no change whatsoever on the front end level…

  28. Hermann says

    If I would like to have the featured posts in a row, like:
    1 | 2 | 3
    and not
    1
    2
    3

    Did anyone know how to css this? Tried several things that didn’t work out.

  29. says

    Hi! Thank you for all the helpful coding information you provide. I have been trying to use your code and steps above to add a widget area to the homepage but I receive this error when I am navigating back to the widgets:

    Parse error: syntax error, unexpected T_REQUIRE_ONCE in …../html/UltraMountDisplays/wp-content/themes/eleven40/functions.php on line 1

    Could I be missing some brackets perhaps?

    Thank you!
    Jenn LH

      • says

        in functions.php here:
        /** Register widget areas */
        genesis_register_sidebar( array(
        ‘id’ => ‘page-title’,
        ‘name’ => __( ‘Page Title’, ‘eleven40′ ),
        ‘description’ => __( ‘This is the page title section.’, ‘eleven40′ ),
        ) );
        genesis_register_sidebar( array(
        ‘id’ => ‘after-post’,
        ‘name’ => __( ‘After Post’, ‘eleven40′ ),
        ‘description’ => __( ‘This is the after post section.’, ‘eleven40′ ),
        ) );
        genesis_register_sidebar( array(
        ‘id’ => ‘home-featured’,
        ‘name’ => __( ‘Home Featured’, ‘eleven40′ ),
        ‘description’ => __( ‘This is the home featured section.’, ‘eleven40′ ),
        ) );

        and in home.php here:
        = 2 )
        return;

        genesis_widget_area( ‘home-featured’, array(
        ‘before’ => ”,
        ) );

        }

        • says

          oops, home.php didn’t paste correctly, I’m sorry:
          = 2 )
          return;

          genesis_widget_area( ‘home-featured’, array(
          ‘before’ => ”,
          ) );

          }

        • says

          Ok, I will try again, so sorry, home.php didn’t paste correctly:
          = 2 )
          return;

          genesis_widget_area( ‘home-featured’, array(
          ‘before’ => ”,
          ) );

          }

          • says

            right after = 2 )
            return;

            genesis_widget_area( ‘home-featured’, array(
            ‘before’ => ”,
            ) );

            }

          • says

            no clue why I can’t paste this into the comment properly! I am so sorry for cluttering your comments, feel free to delete!

  30. Paul says

    Brian I used your tutorial on the magazine theme and worked great, but what if I have 2 widgets before content, one floated left, the other floated right, and I want to put a wrapper div around them? I have tried several methods to wrap the widget areas without success.

    Here is my code.

    add_action( ‘genesis_before_content’, ‘magazine_home_featured’ );
    function magazine_home_featured() {

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

    genesis_widget_area( ‘home-top-slider-left’, array(
    ‘before’ => ”,
    ) );
    genesis_widget_area( ‘home-top-slider-right’, array(
    ‘before’ => ”,
    ) );
    }

    Like I said widgets work great, just can’t seem to put them together in a div.

  31. Bob R says

    I guess this works for any Genesis powered WordPress site…what do you need to change for another Genesis child theme?

  32. says

    I was forwarded to this blog from the forum. I have prose. I’m a newbie. Can I still just copy and paste the code above? Thanks so much! Can’t wait to have the widget area to use the slider plugin on my homepage!

    Merci!

  33. says

    Hello again! I am still getting an error when I try to add the home widget area to my eleven40 theme. I followed your instructions above. the code for functions.php looks like this:
    ‘Blue’, ‘eleven40-green’ => ‘Green’, ‘eleven40-red’ => ‘Red’ ) );

    /** Add support for structural wraps */
    add_theme_support( ‘genesis-structural-wraps’, array( ‘header’, ‘nav’, ‘subnav’, ‘inner’, ‘footer-widgets’, ‘footer’ ) );

    /** Add new image sizes */
    add_image_size( ‘grid-thumbnail’, 270, 100, TRUE );

    /** Add Viewport meta tag for mobile browsers */
    add_action( ‘genesis_meta’, ‘eleven40_viewport_meta_tag’ );
    function eleven40_viewport_meta_tag() {
    echo ”;
    }

    /** Add the page title section */
    add_action( ‘genesis_before_content_sidebar_wrap’, ‘eleven40_page_title’ );
    function eleven40_page_title() {
    genesis_widget_area( ‘page-title’, array(
    ‘before’ => ”,
    ) );
    }

    /** Add the after post section */
    add_action( ‘genesis_after_post_content’, ‘eleven40_after_post’ );
    function eleven40_after_post() {
    if ( ! is_singular( ‘post’ ) )
    return;
    genesis_widget_area( ‘after-post’, array(
    ‘before’ => ”,
    ) );
    }

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

    /** Register widget areas */
    genesis_register_sidebar( array(
    ‘id’ => ‘page-title’,
    ‘name’ => __( ‘Page Title’, ‘eleven40′ ),
    ‘description’ => __( ‘This is the page title section.’, ‘eleven40′ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘after-post’,
    ‘name’ => __( ‘After Post’, ‘eleven40′ ),
    ‘description’ => __( ‘This is the after post section.’, ‘eleven40′ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-featured’,
    ‘name’ => __( ‘Home Featured’, ‘eleven40′ ),
    ‘description’ => __( ‘This is the home featured section.’, ‘eleven40′ ),
    ) );

    and my code for home.php looks like this:
    = 2 )
    return;

    genesis_widget_area( ‘home-featured’, array(
    ‘before’ => ”,
    ) );

    }

    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );
    add_action( ‘genesis_loop’, ‘eleven40_grid_loop_helper’ );
    /** Add support for Genesis Grid Loop */
    function eleven40_grid_loop_helper() {

    if ( function_exists( ‘genesis_grid_loop’ ) ) {
    genesis_grid_loop( array(
    ‘features’ => 1,
    ‘feature_image_size’ => 0,
    ‘feature_image_class’ => ‘alignleft post-image’,
    ‘feature_content_limit’ => 0,
    ‘grid_image_size’ => ‘grid-thumbnail’,
    ‘grid_image_class’ => ‘alignnone’,
    ‘grid_content_limit’ => 250,
    ‘more’ => __( ‘[Continue reading]‘, ‘genesis’ ),
    ‘posts_per_page’ => 5,
    ) );
    } else {
    genesis_standard_loop();
    }

    }

    genesis();

    • says

      Jenn – not sure why you put that entire block of code at the bottom of the functions file. That’s the code that is currently in the home.php file and the duplicate function is what’s causing the issue.

  34. says

    Hello Brain, I am trying to add this function to just my landing page. It works fine on my main site, but how do I get it to show up just on the lading page. Thanks so much

  35. Dave says

    Hi Brian,

    I am trying to get this to work to show the slider on the homepage only and my homepage is a page named home, not latest posts.

    I can’t seem to get it to work. What do I need to change?

    • says

      You would need to create a page template file for the page you are using as your homepage, and then add the code that is shown in the tutorial on that page and apply the page template.

  36. says

    HI Brian! Thank you so much for be awesome. This page has been a tremendous help. I added the Home Featured widget area to my site. Is there any way to make it the width of the entire content area and not the full width of the screen?

  37. shawn says

    Using the paged variable for the query is not at all dependable. How about when you have added multiple post-types to the website? Using paged still returns true for each custom post-type ‘index’ page, hence my ‘homepage’ slider was showing up on every link.

    this seemed to work much better for me:

    function eleven40_home_featured() {
    
        /** Do nothing on page 2 or greater */
        if (!is_front_page())
            return;
    
        genesis_widget_area( 'home-featured', array(
        'before' => '<div class="home-featured widget-area">',
        ) );
    
    }
  38. says

    Hi! Thanks for all the great work you have created through Genesis/Studiopress.

    I am learning as I go…and pretty new to this…

    On the Eleven40 theme, I have serious issues with the home page:
    #1 – its repeating the posts from the blog- I read something above about this, but I dont know how to fix it,
    #2 Some how I lost my footer widgets

    essentially I really like the layout of this site:
    http://www.thecultureist.com

    and I would like my site to look really similar
    http://www.diamondlifeandstyle.com

    Thanks for all your super detailed assistance!!!
    :)
    K

  39. Bruce Max says

    Hi Brian,

    I’ve Eleven40 Studiopress Theme & I was trying to display 2 Column ads in my sidebar, using Text Widget, just like Greg have done on his website gregrickaby.com. I’ve used the exact method, but instead of showing 2 columns, all ads are showing up in 1 column. Please help.

    It should not happen, because both the themes & their sidebar widths are same, but I would like to give the sidebar width a try. Please let me know, how we can change the width in Eleven40 Theme.

    Thanks.

    Bruce

    • thebluegger says

      In addition to the updated Design Settings page, we also created a Custom Code page, which is where custom CSS and custom functions can be placed. These files will now be saved in the /wp-content/ directory of your WordPress install, rather than in the Prose child theme folder.

      This means that you should not be modifying the style.css or functions.php files inside the Prose theme folder, as those will get overwritten in a Prose update

      Link to Studiopress – http://www.studiopress.com/releases/prose-theme-15.htm

  40. says

    I am planning to buy genesis theme.I am interested in eleven40 theme and prose theme so please tell me which is best for Adsense integration and technology blogs.

  41. says

    Hi Brian –

    Loving your Eleven40 theme – thanks!

    Question – above in the comments I saw where the home widget can be placed under the title of the post by modifying the code change in home.php

    Yep, just change

    add_action( ‘genesis_before_loop’, ‘eleven40_home_featured’ );

    to

    add_action( ‘genesis_after_header’, ‘eleven40_home_featured’ );

    I tried this and the widget is now far left and above the title still . . . I checked the .css and could not find the problem.

    Any suggestions?

    Chris

  42. Karl says

    So what I’m getting from this is that all I have to do is change the hook your code is referencing to whichever hook I want to add a widgeted area to and blammo, there it will be? Or will potential problems arise from doing so? I mean, I realize I still have to style css to taste to make it fit with my work, but this all seems a little too easy and hard to believe. Is there a catch?

    Cheers,

    K

      • Karl says

        Well what’ya know! Works like a charm :) Now is there a way to use the “add action” command with the simple hooks plugin instead of the functions.php file for easy access? I tried to do that as an alternative and it didn’t work at all. I did check the box to read php, but no dice :(

        So anything different we have to do with simple hooks plugin?

  43. says

    Hi :) I want to add the Genesis Reponsive Slider to the my test site home page directly above the content and followed the instructions and tips in the article and the comments above (I used the genesis_before_content_sidebar_wrap hook).

    However — I need to make the new widget area dynamic. When I use your code in home.php, the widget seemed static, at least responsivity was lost with the Genesis Responsive Slider. I then tried another slider (Wunderslider, with NextGen Gallery functionality) with the same results. I then turned to the “recipe” by nickthegeek (http://designsbynickthegeek.com/tutorials/add-widgeted-sidebar) — and responsivity seems restored — but the new widget shows up on all pages.

    Any neat solution?? Thanking in advance!

  44. says

    …nevermind, solved it. Added the following to Genesis Simple Hooks (under Content Hooks, genesis_before_content_sidebar_wrap Hook):

    Guess I forgot all about those conditional statements. Apologies for any inconvenience.

  45. Peter says

    Hi Brian
    I’ve set up a static homepage using a particular page. I’ve carried out your instructions above and in order to get the widget to appear in the page I’ve copied this into the page editor:

    Welcome

    It works fine as a text widget going across the page. What I’d like to do now is below this to add 3 more text widgets, next to each other. I’ve tried copying this code a second time but I just get three single full width widgets.

    Any help would be appreciated.

    Thanks

  46. says

    Hi Brian! I am trying to add a home page widget area and I’m using the eleven40 theme. I’ve followed all your steps and the widget area showed up on my widgets page but when I put content in it nothing shows up!?! What did I do wrong?

    P.S. My ultimate goal is to show only the homepage widget and no page or other content

    thanks!

  47. says

    Hey Brian,

    You helped me add a homepage featured area earlier and I appreciate that. I was wondering if you can tell how to fix this problem

    My site ( http://www.sociallyactive.ca ) looks great on a computer but on my iPad the slider doesn’t stay in it’s place or modify to the right size. Am I missing code?

    (PS I am using the responsive Revolution Slider currently but I had the exact same problem with the Genesis Responsive slider too)

  48. says

    I am using Prose and looking to add a slider above the blog section of my website but below the header. I am a little confused about where to paste these two pieces of code. I went to the custom code editor and added both of them into the “Custom Function” section but I don’t see any additional widget areas. I’ve tried re-arranging the code (first one first then first one second) and tried renaming the “eleven40″ portions of the code with “prose” but to no avail. What am I doing wrong??? At this point the “Custom Code” section reads as follows:

    = 2 )
    return;

    genesis_widget_area( ‘home-featured’, array(
    ‘before’ => ”,
    ) );

    }

    genesis_register_sidebar( array(
    ‘id’ => ‘home-featured’,
    ‘name’ => __( ‘Home Featured’, ‘prose’ ),
    ‘description’ => __( ‘This is the home featured section.’, ‘prose’ ),
    ) );

    • says

      Well, that code got a bit screwy when I posted it. Let me know if you need the entire thing. I’ll figure out a way to get it to you.

  49. Anton says

    Hey Brian,

    What if I don’t want to use the blog page as my homepage? A traditional business website has a homepage with a slider and three columns of info below, and the blog is located off the homepage.

    Is there a way that I could use this code to add a widget area to my homepage if it is not the blog page?

    Thanks in advance!

  50. says

    Hey Brian,
    I’m using your outreach theme and I’m trying to two sliders instead of one. I shrunk “.full-width-content #content” down to 60% to make room for another slider.
    Should I create another widget – if so, how do I align the widgets side by side horizontally?
    Or place two sliders in the current “Home Featured” widget – I’m currently trying this but just can’t customize it to look right. http://crossings.direcconnec.com

    thanks,
    Henry

  51. says

    This is exactly what I was looking for! I am able to customize my Eleven40 theme in such a way it models Derek Halpern’s social triggers website. Thanks for sharing.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>