Community Forums › Forums › Archived Forums › Design Tips and Tricks › Enterprise Theme – Move New Homepage Feature Widget
- This topic has 6 replies, 2 voices, and was last updated 9 years, 5 months ago by
lianam.
-
AuthorPosts
-
October 20, 2015 at 8:08 am #168573
lianam
MemberHello,
I'm working on a site using the Enterprise Pro theme. I just added a "Homepage Feature" widget where I wanted to add text about the site. Currently, I have it showing up under the Header/logo of the site. I would prefer that it goes under another widget ("Home-Top"). Can anyone tell me how to adjust the coding to make this happen?
Here's the code I added to the functions.php :
/** Top Homepage feature section */
add_action( 'genesis_after_header', 'news_homepage_feature', 9 );
function news_homepage_feature() {
if ( is_home() && is_active_sidebar( 'homepage-feature' ) ) {
echo '<div class="homepage-feature">';
dynamic_sidebar( 'homepage-feature' );
echo '</div><!-- end .homepage-feature -->';
}and this was added to the .css file :
.homepage-feature {
background:#ddd;
width:960px;
margin:0 auto;THANK YOU!
http://hdfamilylawgroup.com/October 20, 2015 at 8:45 am #168579Davinder Singh Kainth
MemberFor that you would need to define widget in front-page.php file between home-top and home-middle code.
Sunshine PRO genesis theme
Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis ThemesOctober 20, 2015 at 10:17 am #168588lianam
MemberHi Davinder,
Thanks. Is there a tutorial that would tell me how to do that/what to put?
October 21, 2015 at 10:51 am #168669lianam
Memberbumping up - still need help - thanks!
October 25, 2015 at 6:10 am #168959Davinder Singh Kainth
MemberIt is difficult to make such change without access to actual theme files. However, following is the logic you can try:
***backup before making changes***
1. Define widget in functions.php file. Home - Featured
Replace this code..
//* Register widget areas genesis_register_sidebar( array( 'id' => 'home-top', 'name' => __( 'Home - Top', 'enterprise' ), 'description' => __( 'This is the top section of the homepage.', 'enterprise' ), ) ); genesis_register_sidebar( array( 'id' => 'home-bottom', 'name' => __( 'Home - Bottom', 'enterprise' ), 'description' => __( 'This is the bottom section of the homepage.', 'enterprise' ), ) ); genesis_register_sidebar( array( 'id' => 'after-entry', 'name' => __( 'After Entry', 'enterprise' ), 'description' => __( 'This is the after entry widget area.', 'enterprise' ), ) );
with...
//* Register widget areas genesis_register_sidebar( array( 'id' => 'home-top', 'name' => __( 'Home - Top', 'enterprise' ), 'description' => __( 'This is the top section of the homepage.', 'enterprise' ), ) ); genesis_register_sidebar( array( 'id' => 'home-featured', 'name' => __( 'Home - Featured', 'enterprise' ), 'description' => __( 'This is the featured section of the homepage.', 'enterprise' ), ) ); genesis_register_sidebar( array( 'id' => 'home-bottom', 'name' => __( 'Home - Bottom', 'enterprise' ), 'description' => __( 'This is the bottom section of the homepage.', 'enterprise' ), ) ); genesis_register_sidebar( array( 'id' => 'after-entry', 'name' => __( 'After Entry', 'enterprise' ), 'description' => __( 'This is the after entry widget area.', 'enterprise' ), ) );
Sunshine PRO genesis theme
Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis ThemesOctober 25, 2015 at 6:11 am #168960Davinder Singh Kainth
Member2. Make this change in front-page.php file.
Replace this code...
function enterprise_body_class( $classes ) { $classes[] = 'enterprise-pro-home'; return $classes; } function enterprise_home_top_widgets() { genesis_widget_area( 'home-top', array( 'before' => '<div class="home-top widget-area"><div class="wrap">', 'after' => '</div></div>', ) ); } function enterprise_home_bottom_widgets() { genesis_widget_area( 'home-bottom', array( 'before' => '<div class="home-bottom widget-area">', 'after' => '</div>', ) ); } genesis();
with....
function enterprise_body_class( $classes ) { $classes[] = 'enterprise-pro-home'; return $classes; } function enterprise_home_top_widgets() { genesis_widget_area( 'home-top', array( 'before' => '<div class="home-top widget-area"><div class="wrap">', 'after' => '</div></div>', ) ); } function enterprise_home_featured_widgets() { genesis_widget_area( 'home-featured', array( 'before' => '<div class="home-featured widget-area"><div class="wrap">', 'after' => '</div></div>', ) ); } function enterprise_home_bottom_widgets() { genesis_widget_area( 'home-bottom', array( 'before' => '<div class="home-bottom widget-area">', 'after' => '</div>', ) ); } genesis();
Sunshine PRO genesis theme
Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis ThemesOctober 28, 2015 at 9:18 am #169355lianam
MemberThanks so much! I have it set now. 🙂
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.