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;
}
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?
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.
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?
Bob – the difference here is that the Home Featured widget area isn’t full width (in between the header and the content area.) It’s actually on top of the content area, in between the sidebars.
Is there a way to put it above the content area, below the header, and full width?
Yep, just change
add_action( 'genesis_before_loop', 'eleven40_home_featured' );to
add_action( 'genesis_after_header', 'eleven40_home_featured' );Thanks. That worked perfectly. Peace
Hey Brian – can you advise how to get this new widget after header section into the wrap? thanks!
Just change this code:
add_action( ‘genesis_before_loop’, ‘eleven40_home_featured’ );
To this code:
add_action( ‘genesis_after_header’, ‘eleven40_home_featured’ );
right – that’s what I’ve done (it’s where I want it) but it is sticking it between the header and the .wrap. I want it to be within the wrap so it’s styled like the rest of the wrap. Does that make sense?
Can you leave a link to the site where this is happening so I can see?
Hi Brian,
Thanks for this, it’s very helpful.
Would you mind providing the code to produce the portfolio page like on your site: http://www.briangardner.com/themes/
David
It’s a full width normal WP page, using blocks of this:
And this CSS:
Eh… I could have used that info yesterday.
I had to give your themes page the once over with firebug and I produced this
http://www.wmwebdesign.co.uk/genesis-child-themes-for-wordpress/
Don’t worry… no hotlinking on the images.
Took me ages to add images and affiliate links.
Excellent display of our themes Keith. Now if you want to get real funky as an affiliate, create a page for each theme – might be able to land some theme specific SE traffic that way.
Thanks Brian
I’m new at this affiliate business so any tips are gratefully accepted.
Could that be your next post – best practice for Genesis, Scribe, Premise affiliates?
As for display of themes…
I only copy code from the best. LOL
Thanks. I thought you might have a custom portfolio page with featured page widgets, but thank you for the code snippets.
I try my best to do things in a way that are easy to update/modify. Sometimes that means less page templates and widgets.
Whoa! This code is exactly what I needed for a page I need for 2 sites. And the Home Widget area will be very useful too
Thanks Brian!
You’re welcome Mike. Always happy to appease.
Hi Brian,
As always, thanks for sharing these amazing how-to’s and snippets with us! You’re awesome++!
Regarding the CSS, I added it to the bottom of my stylesheet. Is that a no-no? I ask because I’m not getting the same effect you are. *blush* CSS is not my strong-suit…yet!
URL: http://www.diywebsitestore.com/wordpress-themes/studiopress-themes-for-wordpress/
Thanks again,
Kat
Me again! Ignore the above comment. It’s working fine now.
Again, YOU (& the StudioPress team) ROCK!!
Thanks again!!
Kat
One last thing: How can I get the ShareThis buttons to move to the bottom of that page? Is there an added I need to add?
Thanks again, and sorry for the added post. *blush*
Thanks for the code, Brian. I was able to create the page fairly smoothly. The only issue I’m having is that the “MarketPlace” section I created, on the same page, is wrapping around the theme images.
How can I stop this from happening? I’ve added an extra div tag to both sections, and even paragraph tags. But neither helped.
Thanks again!
Kat
For anyone in need of the answer, just add the following snippet to the end of that section.
Sorry, that didn’t show up above:
<div class="clear"></div>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.
Nice job on your website design, Keith. Looks great.
Eh.. thanks Jared.
Sorry for the long pause… only just spotted this.
Thanks Brian for blogging these snippets. I was working on this yesterday but should have waited until today and saved a couple of hours work
.
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.
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 ~
No, there’s really not – the widget’s intent isn’t really to show featured posts, rather for other types of things like email signup boxes, etc.
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.
Hm – not sure why that would be happening. What kind of smart phone do you have?
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.
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.
Haha, that’s great Mike. Let me know what you need in advance, and I’d be happy to consider writing a tutorial for it. Win-win for us both.
It’s a deal!
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?
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
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.
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
Hello again, did you get my last comment about the tags on the front page?
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!
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?
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?
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.
We’re in the process of building a Genesis Responsive Slider plugin, which will help make the slider portion of that page mobile responsive friendly.
Thanks Brian. The slider is actually working on the iPad. Doesn’t on the iPhone though. Looking forward to plugin.
@jim,
would you mind sharing how you added the ‘added three widgeted areas under the slider’
thanks!
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.
Happy for you to share the code here.
O.K. So I added this to my custom template.php
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:
and finally on the Stylesheet:
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?
Can’t you achieve the same with Genesis Simple Sidebars plugin?
That’s what I ended up doing (as I couldn’t get that tutorial to work properly).
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.
Excellent Brian, it was really helpful. I would also like to know the answers of Randy’s queries.
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?
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!
Thanks David – appreciate that!
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
Hey Josh – are you referring to the full width section that’s on the homepage of Generate?
Yeah. Is there a way to do something similar on eleven40? Thanks.
I would love to know how to do this as well. I love everything about this theme, but I wish I could add the opt-in email header from generate. Thanks!
Thanks for this — you saved me a solid 30 minutes of work.
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
You’d have to do some hacking of the Genesis Grid Loop code if you wanted to bypass or skip posts found within the loops.
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
Hey Bill – the Agency theme is undergoing a redesign, and we’re hoping to have this released by the end of next week.
Fantastic!
Is that a responsive slider I see on the home page?
Bill
Yes it is. A soon to be released plugin by us.
That looks really sharp. I’d be glad to test that slider in beta as I’m using the Genesis slider in eleven40. Also tried customizing a different slider that is responsive but couldn’t get it to look like I want it to look.
See email I just sent.
Wowww-wowww-wowwww… awesome
Are you going to challenge Woo Themes in the field of eCommerce WordPress themes?
The shopping cart looks cool and invite you to choose some products whereas the clean slider on the Homepage stands out on the page and you clearly can display your hot things on your site.
Glad I can use this when available as a Pro Plus StudioPress member.
Awesome!
I would also be happy to beta test in eleven40.
Email also sent.
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?
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.
Great. Thanks. I look forward to that one.
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?
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.
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!
also, the page I’m referring to is http://www.mediarology.com/wp. Forgot to mention that!
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();
Good to hear you got this resolved…
Just set up a new site. And am trying to configure the responsive slider widget.
Pretty happy, but can’t seem to get rid of a couple bullets.
(see an image here)
https://plus.google.com/u/0/114622182368331772065/posts/UZUWEzvX2gj
I have edited the styles.css of the plugin adding: list-style: none; wherever I see an “li” but only managed to delete one of the three bullets.
Any help would be greatly appreciated.
Can you link to the live site? It’d be easier for me to help seeing it in action.
http://serresdudosblanc.com/
(sorry… I put it as my website, linked to my name)
Thanks again.
This is really cool, 2 simple steps to get whatever we want. Thanks Brian.
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.
Why is the content not showing when I used eleven40 theme?
Did you do anything in the functions file? Either that or there’s a plugin conflict of sorts.
Hi,
Thanks for the quick reply.
I didn’t do anything. And I only have Genesis eNews and Genesis Footer plugins activated.
Please advice.
Here’s the testing site: http://themes.oneimspro.com/eleven40/
Thanks!
here’s the testing site: http://themes.oneimspro.com/eleven40/
Hi,
Thanks for the quick reply.
I didn’t do anything. And I only have Genesis eNews and Genesis Footer plugins activated.
Please advice.
Here’s the testing site: http://themes.oneimspro.com/eleven40/
Thanks!
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
For that, all you need to do is have a Blog Title listed on your Settings page.
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!
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.
Thanks for the response, we’ll have to keep our share icons above or below the posts for now.
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
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.)
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 : )
Yes, it would basically be the same steps, though you’d add the Genesis Slider in the widget area instead of a tex widget.
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
If you go into the home.php file, you’ll see the parameter for # of posts per page.
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…
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.
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
Hm, where are you placing the code?
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’ => ”,
) );
}
oops, home.php didn’t paste correctly, I’m sorry:
= 2 )
return;
genesis_widget_area( ‘home-featured’, array(
‘before’ => ”,
) );
}
Ok, I will try again, so sorry, home.php didn’t paste correctly:
= 2 )
return;
genesis_widget_area( ‘home-featured’, array(
‘before’ => ”,
) );
}
right after = 2 )
return;
genesis_widget_area( ‘home-featured’, array(
‘before’ => ”,
) );
}
no clue why I can’t paste this into the comment properly! I am so sorry for cluttering your comments, feel free to delete!
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.
Hey Paul, can you provide a link to the site? It’d probably be easier to see it in action and to be able to diagnose with Chrome Developer Tools.
Brian, when are you going to give a solution to show on the homepage only posts of specifics categories and block others categories ?
Thanks
Are you referring to themes like eleven40 which use the Genesis Grid Loop?
Thank you, yes Brian.
Brian, I’m still needing to know if there is a way to show on the homepage only posts of specifics categories, I’m using Eleven40 Theme. Thanks
I guess this works for any Genesis powered WordPress site…what do you need to change for another Genesis child theme?
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!
Melanie – yes, just use the code supplied and if you’re running the latest version of Prose, you can use the Custom Code box.
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();
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.
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
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?
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.
I am not really sure how to do that with Genesis. I am new to it. Can you point me in the right direction?
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?
I am specifically trying to have the slider content in the content area. Right now it is left justified.
Yes, make sure you assign a width to the .home-featured CSS and then set margin: 0 auto;.
Thank you, thank you, thank you! It’s working like a bawsss (aka boss…for those who need the translation LOL)
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:
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
Hey, sorry your comment got marked as spam, and I just now found it. The best thing to do would be to ask these questions in our community forum and we’ll be glad to help you there.
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
Hey Bruce – can you link me to the site where you want this to happen? Chances are you just need to float the ads via CSS.
Please Check Here: affiliatemarketingtipsv.com
For now, I’ve just used the sample text, I got from Greg’s Post, where he explained how to do it. Just wanted to see the preview. Waiting for response.
Thanks.
Hi Brian,
Still waiting for your reply on the 125X125 ads display question.
Thanks.
Bruce
Hey Bruce – sorry about that, missed your reply coming back.
Try adding CSS like this:
Thanks Brian,
Where I’ve to add this css code, in Eleven 40 Theme?
Thanks.
I figured out, Thanks. Now its showing fine.
Hi,
I’m really thankful to you because the post you updated helped me alot in adding a navigation menu in the header.
I was trying this since very long.
Thank you very much.
I did the first step but can seem to find the home php in prose theme?! Any tips.
Thanks
Link to Studiopress – http://www.studiopress.com/releases/prose-theme-15.htm
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.
Really either of them will work fine.
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
More than likely you’d need to center align the stuff that you have hooked below the header. Do you have a link to the site so I can see?
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
For the most part yes – understand depending on which hook it goes you might have to tweak CSS a bit to ensure it looks ok.
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?
you have really helped me Brian, thanks for this codes.
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!
…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.
I’m sure I’m doing something wrong, but none of the widgets I have added are showing in the designated area. Any common mistakes people make when doing this?
Hey Kevin, got a link to the site?
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
Hi again
The code I added in the previous message hasn’t appeared – just ‘Welcome’
Not sure how to show you what I’ve added to the page.
Got a link to the site?
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!
Hey Danielle – sorry for the delay, your comment was marked as spam. Did you get this resolved?
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)
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’ ),
) );
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.
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!
Amazing! Getting so close to being able to launch the new design and switch to WP. Thank you!
That’s great news Sarah, please come back and let me know when you make the switch!
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
Henry, best to address this question in the My.StudioPress help area. We’re trying to keep all theme support over there.
I have installed this header and the slider many times but on the latest site I get the home featured widget and put the slider in but it is not showing up. http://www.rusticgardenbistro.com
Any suggestions? Thanks!
Hey Cheri – just wanted to follow up with you on this. Sorry it took so long to get your comment approved, it was in the spam section for some reason.
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.
Awesome! thank you for easily solving my dilemma. now i can use a featured post as place holder content when I don’t have time to write.