Community Forums › Forums › Archived Forums › General Discussion › Sidebar in the wrong spot!
- This topic has 8 replies, 2 voices, and was last updated 9 years, 4 months ago by
Sridhar Katakam.
-
AuthorPosts
-
October 27, 2015 at 3:52 pm #169262
lianam
MemberHello there! I am trying to put a sidebar on the Home Page of this Enterprise site. When I adjust in "front-page.php" so that it did a content-sidebar layout rather than a full-width one, it allowed the Home-Top Widget area to remain at full-width and pushed the sidebar to the bottom of the page. Any ideas why? I want the sidebar to be at the top (beside the Home-Top Widget area/by the image...like a normal sidebar). THANKS!
I changed this:
//* Force full-width-content layout setting
//* add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );To this:
// Force content-sidebar layout setting
http://hdfamilylawgroup.com/
add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_content_sidebar’ );October 27, 2015 at 6:22 pm #169290Sridhar Katakam
Participant1) In functions.php, replace
genesis_register_sidebar( array( 'id' => 'home-top', 'name' => __( 'Home - Top', 'enterprise' ), 'description' => __( 'This is the top section of the homepage.', 'enterprise' ), ) );
with
genesis_register_sidebar( array( 'id' => 'home-top-left', 'name' => __( 'Home - Top - Left', 'enterprise' ), 'description' => __( 'This is the top left section of the homepage.', 'enterprise' ), ) ); genesis_register_sidebar( array( 'id' => 'home-top-right', 'name' => __( 'Home - Top - Right', 'enterprise' ), 'description' => __( 'This is the top right section of the homepage.', 'enterprise' ), ) );
2) In front-page.php, replace
is_active_sidebar( 'home-top' )
with
is_active_sidebar( 'home-top-left' ) || is_active_sidebar( 'home-top-right' )
and
function enterprise_home_top_widgets() { genesis_widget_area( 'home-top', array( 'before' => '<div class="home-top widget-area"><div class="wrap">', 'after' => '</div></div>', ) ); }
with
function enterprise_home_top_widgets() { echo '<div class="home-top"><div class="wrap">'; genesis_widget_area( 'home-top-left', array( 'before' => '<div class="home-top-left widget-area three-fourths first">', 'after' => '</div>', ) ); genesis_widget_area( 'home-top-right', array( 'before' => '<div class="home-top-right widget-area one-fourth">', 'after' => '</div>', ) ); echo '</div></div>'; }
3) In style.css, add
.home-top .featured-content .entry-title { font-size: 20px; margin-bottom: 20px; } .home-top-right .widget { padding: 70px 10px 0 10px; margin-bottom: 0; }
4) At Appearance > Widgets, drag the widget that was present in Home Top widget area [it would have moved to Inactive Sidebar (not used) section] into Home - Top - Left widget area. In the Home - Top - Right widget area, drag your desired widget(s).
to get
CSS adjustments (incl. for responsiveness) may additionally be needed.
October 27, 2015 at 9:10 pm #169294lianam
MemberHelp, Sridhar! I've messed something up! Can you take a look and maybe help me with it? I did make all the changes, but must have done something wrong. HELP! Thank you in advance!
October 27, 2015 at 9:40 pm #169296lianam
MemberSridhar...So I kind of fixed some of it. For a while the site had a blank page since I made some mistakes with the code.
But now I need to get rid of the 2nd "Contact Us" form that is showing up at the bottom of the page (because it's in the Primary Sidebar widget and I need it to keep showing up on other pages). I know I did something and can't remember how to fix it.
Also...The Home Page is all off and funky. How do I get it back to the normal width so that it's not running off he sides of the page/screen?
THANK YOU AGAIN!
October 27, 2015 at 9:45 pm #169298Sridhar Katakam
ParticipantCan you send me the WordPress admin and FTP logins via https://sridharkatakam.com/contact/ so I can look inside and attempt to fix?
October 27, 2015 at 10:02 pm #169300lianam
MemberThank you, Sridhar! I just emailed you.
October 27, 2015 at 11:38 pm #169306Sridhar Katakam
ParticipantFixed.
1) in style.css changed
.ninja-forms-form .field-wrap label { font- size: 14px; }
to
.ninja-forms-form .field-wrap label { font-size: 14px; }
2) in front-page.php changed
echo '<div class="home-top"><div class="wrap>';
to
echo '<div class="home-top"><div class="wrap">';
October 27, 2015 at 11:56 pm #169308lianam
Memberthank you so much!!!
October 27, 2015 at 11:59 pm #169310Sridhar Katakam
ParticipantYou are welcome.
You might want to mark the topic resolved.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.