Community Forums › Forums › Archived Forums › General Discussion › Full Width Slider
- This topic has 8 replies, 3 voices, and was last updated 11 years, 2 months ago by Brad Dalton.
-
AuthorPosts
-
January 24, 2013 at 8:57 pm #14524jclark117Member
I'd like to have a slider that's full width but still have the standard Agentpress format below as it is in the demo. I tried changing the settings for the slider area but it's not working. How can I set the slider to be full width but the rest of the content the standard width.
January 25, 2013 at 7:40 am #14577SoZoMemberYou need to remove the width from #wrap and add widths and auto left/right margins to those elements you want to be centered and contained in a width.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
February 12, 2013 at 9:24 pm #20007jclark117MemberAre you talking about featured top because I'm not seeing any width in #wrap. I tried removing width from all the areas i thought affecting it using Firebug and nothing worked.
This is the site I'm referring to: http://www.clarkrealestate.org/wordpress/
February 13, 2013 at 1:26 am #20029Brad DaltonParticipantAnother way to do this is to create a widget area in the exact location you want your slider using genesis hooks and a conditional tag to display on the homepage only:
// Register before-content widget genesis_register_sidebar( array( 'id' => 'before-content', 'name' => __( 'WP Sites Custom Widget', 'agentpress' ), 'description' => __( 'This is the before-content section.', 'agentpress' ), ) ); // Hook before content on home page only add_action( 'genesis_before_content_sidebar_wrap', 'custom_before_content', 9 ); function custom_before_content() { if ( is_home() && is_active_sidebar( 'before-content' ) ) { echo '<div class="before-content"><div class="wrap">'; dynamic_sidebar( 'before-content' ); echo '</div></div>'; } }
If the code doesn't display here correctly, you can grab it from Pastebin.
php and html can cause a problem.
Style using .before-content{}
You can change the hook if you choose another location for the slider and change the conditional tag also.
If you want to use another slider, i suggest the easing slider plugin where you can simply paste a line of code into the Genesis Simple Hooks plugin field depending on where you want to hook your slider in:
<?php if (is_home()) { easing_slider(); }; ?>
I tested this code locally using the AgentPress theme and it looks great.
February 13, 2013 at 6:37 pm #20187jclark117MemberI didn't have any luck with that. I want the slider to display in the slider area with the search box over the slider. I want the slider to display full width but still keep the content below it wrapped the way it is now. Someone please help, I'm struggling. The bad part is this isn't a clients site, it's mine.
February 14, 2013 at 1:56 am #20258Brad DaltonParticipantThat code has errors because php and html cannot be displayed together using shortccodes for php so you need to click the link to pastebin.
You can change the location of the slider by changing the hook and it works because i tested it on your theme locally.
You can then add the search box.
February 14, 2013 at 12:48 pm #20347jclark117MemberI copied it from Pastebin and I'm still struggling. What code do I need to be using in the hook? I've not worked a whole lot with hooks so I'm lost.
February 14, 2013 at 12:49 pm #20348jclark117MemberIs there a way to do this in the slider section so I don't have to do so much manipulation?
February 14, 2013 at 1:51 pm #20371Brad DaltonParticipantPaste the code into your child themes functions.php file and then drag the Genesis Responsive Slider into the widget area after you install the plugin.
No need to use the simple hooks
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.