Community Forums › Forums › Archived Forums › Design Tips and Tricks › Prose: full width area after sidebar on home page?
Tagged: after sidebar, Prose, widgetized area
- This topic has 19 replies, 3 voices, and was last updated 11 years ago by
Tom.
-
AuthorPosts
-
April 22, 2014 at 1:40 pm #101925
cissyh
MemberI love Genesis framework and I've used it on my last several designs. I've run into a wall and I'm hoping someone here can help me. I'm certain my problem is embarrassingly simple but I can't seem to find the answer. I'm using Prose to redesign a client's site website, and I'd like to add a full width widgetized area on the home page only at genesis_after_content_sidebar_wrap.
You can see the page I'm working at http://jayneannkrentz.com/dev2013. I'd like everything from "Recent Releases" on down to be full width. Can anyone suggest the best way to accomplish it?
Thanks in advance for your help
http://jayneannkrentz.com/dev2013April 23, 2014 at 12:54 pm #102094cissyh
MemberI thought I might get better response if I explained what I'd already done.
I've added this to the custom code area but no new widget is showing up on the widgets page:
/** Register widget areas */ genesis_register_sidebar( array( 'id' => 'after-sidebar', 'name' => __( 'After Sidebar', 'prose' ), 'description' => __( 'This is the a full width section after the sidebar but before the footer.', 'prose' ), ) ); add_action( 'genesis_after_content_sidebar_wrap', 'add_genesis_widget_area' ); function add_genesis_widget_area() { genesis_widget_area( 'after-sidebar', array( 'before' => '<div class="after-sidebar widget-area">', 'after' => '</div>', ) ); }
I'd really appreciate any help you guys can provide. Thanks!
April 23, 2014 at 1:23 pm #102101cissyh
MemberAnother update: I've also tried the following code based on a similar question at http://www.studiopress.community/topic/placing-a-footer-banner-above-footer-widgets-how-is-this/ that I found searching the forum.
Still no new widget area showing up.
//* Register widget areas genesis_register_sidebar( array( 'id' => 'before-footer', 'name' => __( 'Before Footer Widget', 'prose' ), 'description' => __( 'Add Content Before The Footer Site Wide', 'prose' ), ) ); add_action( 'genesis_before_footer', 'prose_before_footer_widget', 1 ); function prose_before_footer_widget() { if ( is_active_sidebar('before-footer') ) { genesis_widget_area( 'before-footer', array( 'before' => '<div class="before-footer" class="widget-area">', 'after' => '</div>', ) ); } }
April 24, 2014 at 9:00 am #102162cissyh
MemberI'm not sure if it's kosher to "bump" messages, but I'm really hoping to get a response on this. Thanks so much.
April 25, 2014 at 8:50 am #102314cissyh
MemberIs this an impossible task or am I asking a stupid question? I truly would appreciate help with this issue.
Thanks in advance.
April 25, 2014 at 2:01 pm #102359AnitaC
KeymasterApril 25, 2014 at 2:14 pm #102361cissyh
MemberThanks so much for responding. This got me closer. The widget area is appearing on the Widgets list in the dashboard but the text I put into the widget box isn't showing up on the home page.
I put this code at the end of Prose's /lib/init.php file
genesis_register_sidebar( array( 'id' => 'after-sidebar', 'name' => __( 'After Sidebar', 'prose' ), 'description' => __( 'This is a full-width widget on the home page below the sidebar', 'prose' ), ) ); /** * @author Brad Dalton - WP Sites * @link http://wpsites.net/web-design/home-page-slider-prose-theme/ */ add_action( 'genesis_after_content_sidebar_wrap', 'child_before_post_box' ); function child_before_post_box() { if ( is_home() && is_active_sidebar( 'after-sidebar' ) ) { echo '<div id="after-sidebar">'; dynamic_sidebar( 'after-sidebar' ); echo '</div><!-- end #after-sidebar -->'; } }
And I added this to my stylesheet
#after-sidebar{ margin: 5px 0 10px; padding: 10px; overflow: hidden; }
April 25, 2014 at 2:15 pm #102362AnitaC
KeymasterCan you give me a link so I can take a look at the site and code?
Need help with customization or troubleshooting? Reach out to me.
April 25, 2014 at 2:16 pm #102363cissyh
MemberSure, it's http://jayneannkrentz.com/dev2013
April 25, 2014 at 2:18 pm #102364AnitaC
KeymasterTurn Minify off and any other caching. Clear the cache.
Need help with customization or troubleshooting? Reach out to me.
April 25, 2014 at 2:26 pm #102365cissyh
MemberOkay, minify is off. I'm still seeing no change. Do you see it?
April 25, 2014 at 2:29 pm #102366AnitaC
KeymasterDrag an actual widget in there, not just text.
Need help with customization or troubleshooting? Reach out to me.
April 25, 2014 at 2:30 pm #102367cissyh
MemberI dragged the categories list over into the widget area. Still nothing displaying.
April 25, 2014 at 2:30 pm #102368AnitaC
KeymasterChange before_post_box to after_post_box
Need help with customization or troubleshooting? Reach out to me.
April 25, 2014 at 2:32 pm #102369cissyh
MemberOkay, the code now reads
genesis_register_sidebar( array( 'id' => 'after-sidebar', 'name' => __( 'After Sidebar', 'prose' ), 'description' => __( 'This is a full-width widget on the home page below the sidebar', 'prose' ), ) ); /** * @author Brad Dalton - WP Sites * @link http://wpsites.net/web-design/home-page-slider-prose-theme/ */ add_action( 'genesis_after_content_sidebar_wrap', 'child_after_post_box' ); function child_after_post_box() { if ( is_home() && is_active_sidebar( 'after-sidebar' ) ) { echo '<div id="after-sidebar">'; dynamic_sidebar( 'after-sidebar' ); echo '</div><!-- end #after-sidebar -->'; } }
April 25, 2014 at 2:36 pm #102370AnitaC
KeymasterAdd that code to the Custom box and let's see if it works. On the Prose 1.5 announcement it states "we also created a Custom Code page, which is where custom CSS and custom functions can be placed. "
Need help with customization or troubleshooting? Reach out to me.
April 25, 2014 at 2:39 pm #102371cissyh
MemberI actually tried the code there before I put it in init.php and the widget didn't even show up, but I tried again as we've tweaked the code. Removed it from init.php and moved to the functions box of Custom Code area. The widget is gone again from the Widgets page.
April 25, 2014 at 2:40 pm #102372AnitaC
KeymasterLet me send out a tweet on this. Put it back in the init.php so it shows up.
Need help with customization or troubleshooting? Reach out to me.
April 25, 2014 at 2:42 pm #102374cissyh
MemberDone. It's back on the widget list.
April 25, 2014 at 6:07 pm #102398Tom
ParticipantHi Cissy...
Anita's work is spot-on, but it seem you still have a problem. The code from Brad will work (I've used it before for a slider) and it works as you've modified it in a cut-and-paste test on a local install to setup your desired widget.
There must be some small conflict being overlooked.
I've screen-capped my result with Genesis action hooks showing if it helps:
https://i.cloudup.com/kEqBX66Nyg-2000x2000.png
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ] -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.