Community Forums › Forums › Archived Forums › Design Tips and Tricks › Adding second widget row to Outreach Pro
Tagged: Outreach Pro
- This topic has 7 replies, 2 voices, and was last updated 9 years ago by
Brad Dalton.
-
AuthorPosts
-
June 27, 2016 at 8:32 am #188377
Giuljo
MemberMy client wants a second row of 4 widgets below the first row. I have succeeded in registering a second row in the admin panel but it doesn't show up on the landing page. My edits were as follows:
functions.php
// add second row of widgets to landing page function outreach_home_bottom_widgets() { genesis_widget_area( 'home-bottom2', array( 'before' => '<div class="home-bottom2 widget-area"><div class="wrap">', 'after' => '</div></div>', ) ); }
style.css
/* for home bottom 2 */ .home-bottom2 { background-color: #fff; padding-top: 60px; } .home-bottom2 .widget { float: left; margin-left: 2.564102564102564%; width: 23.076923076923077%; } .home-bottom2 .widget:nth-child(4n+1) { clear: both; margin-left: 0; } .home-bottom2 .featured-content img { -webkit-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4); -moz-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4); box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4); } .home-bottom2 .widget-title { color: #333; font-weight: 700; }
page_landing.php
// add second row of widgets to landing page function outreach_home_bottom_widgets() { genesis_widget_area( 'home-bottom2', array( 'before' => '<div class="home-bottom2 widget-area"><div class="wrap">', 'after' => '</div></div>', ) ); }
I did see another topic on this but the code referenced there looks nothing like my files. It seems like I'm missing something on the landing page but I can't figure out what. Would greatly appreciate any help is solving this.
June 27, 2016 at 9:04 am #188379Brad Dalton
ParticipantNo need to changer the div class.
Make sure your function name is unique, and your widget i.d is unique and duplicate the code.
Your functions file code should only register the widget
June 27, 2016 at 9:25 am #188381Giuljo
MemberThe widget ID is unique. The widget is registered. I am able to add content on the back end. It's just not showing up on the landing page. The landing page is only showing one row.
June 27, 2016 at 9:30 am #188382Brad Dalton
ParticipantYou mean the front-page.php file?
Post your code in a Github gist and link to it from here please.
June 27, 2016 at 10:04 am #188384Giuljo
MemberI've posted the code for all 4 files that I edited:
I placed comments in caps for the sections I added.
Thank you so much.
June 27, 2016 at 10:59 am #188391Brad Dalton
ParticipantMissing the hook
add_action( 'genesis_before_footer', 'outreach_home_bottom2_widgets', 12 );
Unless you plan on styling the custom widget differently, you can use the same class
'before' => '<div class="home-bottom widget-area"><div class="wrap">',
June 27, 2016 at 11:10 am #188394Giuljo
MemberPerfect! It's working now. I greatly appreciate your help with this. I suspected it would end up coming down to 1 line of code missing. 😀
June 27, 2016 at 11:12 am #188395Brad Dalton
Participant -
AuthorPosts
- The topic ‘Adding second widget row to Outreach Pro’ is closed to new replies.