Community Forums › Forums › Archived Forums › Design Tips and Tricks › Registering Widget Area – Outreach Pro
- This topic has 8 replies, 2 voices, and was last updated 8 years, 10 months ago by
Cheshire.
-
AuthorPosts
-
April 6, 2016 at 7:11 pm #183082
Cheshire
MemberHello
I am using the theme Outreach Pro and would like to create a new widget area on the home page between the home-top and home-bottom widgets - I have called it home-middle.
I would like to be like the home bottom widget area in that it has a full-width background colour, but just want a single content area as I will be inserting an image.
I am not sure what the CSS should be.
This is what I have done:
Theme Functions (functions.php)
genesis_register_sidebar( array(
'id' => 'home-bottom',
'name' => __( 'Home - Bottom', 'outreach' ),
'description' => __( 'This is the bottom section of the Home page.', 'outreach' ),
) );front-page.php
function outreach_home_middle_widgets() {genesis_widget_area( 'home-middle', array(
'before' => '<div class="home-middle widget-area">',
'after' => '</div>',
) );}
Stylesheet (style.css)
.home-middle {
background-color: #000;
padding-top: 60px;
}But it obviously needs a little more as it isn't showing....what am I missing please 🙂
tia Jayne
http://completefinsol.com.au/April 6, 2016 at 10:37 pm #183092Christoph
MemberHi Jayne,
I guess
'id' => 'home-bottom', 'name' => __( 'Home - Bottom', 'outreach' ),
for functions.php is only a typo. Otherwise, you have to change that to home-middle.
What is the add_action for function outreach_home_middle_widgets() in front-page.php?
April 10, 2016 at 12:19 pm #183292Cheshire
MemberHi Christoph
Thank you so much for your reply - it is really appreciated.
First off, silly me, yes, copied across the wrong lines from the functions.php
and I had missed the add_action in the front-page.php!
Awesome! Thanks!
Now to get it looking proper! 🙂
THANKS!!!!!
April 10, 2016 at 1:11 pm #183302Cheshire
MemberChristoph! help!!! 🙂
ok.....next problem! *cry*
How do I make the background site width black like the footer is?
April 10, 2016 at 4:35 pm #183313Christoph
MemberHi,
try adding background-color: #000; to .site-inner
#222 is the color of the footer
#000 is the color of home-bottom
April 11, 2016 at 6:46 am #183370Cheshire
MemberThanks Christoph......SORRY - should have clarified....just that new Middle Widget area
🙂
April 13, 2016 at 10:23 am #183538Cheshire
MemberIs there a way you can just specify a full width background colour for just one widget area? I don't understand how the CSS for the Footer Widget area gives it full width colour versus just content width
April 13, 2016 at 10:40 am #183539Christoph
MemberHi,
the reason is that .wrap is setting max-width: 1140px;
Easiest solution I can think of is to add the home-middle widget area inside of
function outreach_home_bottom_widgets() {
above the code for the home-bottom widget area.(in other words, don't use function outreach_home_middle_widgets() .
Just add the code in the existing function outreach_home_bottom_widgets() )
April 13, 2016 at 10:52 am #183540Cheshire
MemberBrilliant - perfect!
Thanks so much Christoph - and I've learnt some more - thankyou!
-
AuthorPosts
- The topic ‘Registering Widget Area – Outreach Pro’ is closed to new replies.