Community Forums › Forums › Archived Forums › Design Tips and Tricks › Min PRO question, adding widget area
- This topic has 1 reply, 2 voices, and was last updated 8 years, 3 months ago by Davinder Singh Kainth.
-
AuthorPosts
-
December 4, 2015 at 8:17 am #172729workkyMember
I'm helping a good friend with a website and i wanted to add an extra widget area to the home page.
http://brentdawson.org/I've done it, in the form of a "welcome" widget.
The problem is, its not were i want it, i want it right below the site tagline(were the phone number is). It appears it is there, but i think its inside the site inner and it needs to be before the site inner, maybe im wrong. I'm new to adding widgets and whatnot. The only thing i can do is copy the code from another theme and put it in, which is what i did here. I copied the code from the ally theme on Appfinite, which i do own. I did add it to the css as well any help would be greatly appreciated, Thanks
the changes i did are belowFor the theme functions, i did this
genesis_register_sidebar( array(
'id' => 'welcome',
'name' => __( 'Welcome', 'NFA' ),
'description' => __( 'This is the welcome section of the homepage.', 'NFA' ),
) );For the front page.php, i added anything you see as "welcome"
if (is_active_sidebar( 'welcome' ) || is_active_sidebar( 'home-featured-1' ) || is_active_sidebar( 'home-featured-2' ) || is_active_sidebar( 'home-featured-3' ) || is_active_sidebar( 'home-featured-4' ) ) {
//* Add Home featured Widget areas
add_action( 'genesis_before_content_sidebar_wrap', 'NFA_home_featured', 15 );}
}//* Add markup for homepage widgets
function NFA_home_featured() {printf( '<div %s>', genesis_attr( 'home-featured' ) );
genesis_structural_wrap( 'home-featured' );genesis_widget_area( 'welcome', array(
'before' => '<div class="welcome"><div class="wrap">',
'after' => '</div></div>',
) );genesis_widget_area( 'home-featured-1', array(
'before' => '<div class="home-featured-1 widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-featured-2', array(
'before' => '<div class="home-featured-2 widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-featured-3', array(
'before' => '<div class="home-featured-3 widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-featured-4', array(
'before' => '<div class="home-featured-4 widget-area">',
'after' => '</div>',
) );genesis_structural_wrap( 'home-featured', 'close' );
echo '</div>'; //* end .home-featured}
css
.welcome {
clear: both;
font-size: 20px;
font-size: 1.25rem;
font-weight: 300;
text-align: center;
}.welcome .wrap {
text-align: center;
margin: 0 auto;
overflow: hidden;
padding: 20px 0 40px;
width: 1140px;
}I do not know any php, i just know how to copy and paste.
life’s tough, it’s a lot tougher if you’re stupid
My WebsiteDecember 6, 2015 at 9:22 am #172883Davinder Singh KainthMembercheck this - http://www.basicwp.com/add-new-widget-genesis-homepage/
Sunshine PRO genesis theme
Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.