Community Forums › Forums › Archived Forums › Design Tips and Tricks › Full page width slider in Lifestyle theme
- This topic has 8 replies, 5 voices, and was last updated 12 years, 3 months ago by
frobin.
-
AuthorPosts
-
February 19, 2013 at 10:04 am #21350
indiedog
MemberI am a complete nube with Genesis stuff so I apologize if this is a stupid question.
I have the lifestyle theme and installed the Genesis Responsive Slider for the home page. I would like the slider to be full-width, but have a left sidebar underneath. I have already set up the layout in the theme setting and added the slider to the home page, I have played around with the width setting for the slider but to no avail. Any tips anyone could give me would be great.
here is my site
Thanks
Morag Reid
February 19, 2013 at 11:19 am #21368cehwitham
ParticipantIf you want the slider to be full width you'll need to add it before the content sidebar wrap.
In functions.php in /wp-content/themes/lifestyle/ add the following code to register a new sidebar:
'home-full-width',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '',
));
?>Next add a function to output the sidebar:
function display_home_full_sidebar() {
if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( 'home-full-width' ) ) {
}}Then add this to the correct hook to output above the content sidebar wrap:
add_action( 'genesis_before_content_sidebar_wrap', 'display_home_full_sidebar');You can then add the slider widget to the Home Full Sidebar and style it accordingly.
Twitter: cehwitham Web: cehwitham.com
February 19, 2013 at 7:02 pm #21535brankica
Memberindiedog, have you tried this? I am thinking of giving it a go, if it worked for you
February 20, 2013 at 9:21 am #21660indiedog
MemberNo, I couldn't get it to work. The first part broke the functions.php file and frankly wasn't 100% sure I am putting it in the correct place. After reading through the whole thing, I am confused - why would I need to add another side bar? It made no sense so I gave up. If anyone could clarify this for me, I would appreciate it.
February 20, 2013 at 12:24 pm #21722cehwitham
ParticipantThe add sidebar function just refers to another widget area. It doesn't necessarily mean it is a sidebar like the things that run down the side of your page.
Basically it just allows you to add a widget to an area and then output that area in a given location.
Twitter: cehwitham Web: cehwitham.com
February 27, 2013 at 3:12 pm #23170indiedog
MemberHi there,
I finally got working on this again. @cehwitham, thanks for the clarification, sorry, but I could just not get your code to work.
@branika, I used this method here: http://pastebin.com/7S31KHym changing it to reflect the Lifestyle theme. (ie change "agentpress" to "lifestyle").
Onwards and upwards.
Morag
February 28, 2013 at 3:07 pm #23356cehwitham
ParticipantGlad you got it sorted Morag. Thanks for the feedback and link.
Twitter: cehwitham Web: cehwitham.com
July 28, 2013 at 2:47 pm #52998DaisyMC29
MemberI just used the code mentioned by indiedog along with the link and it worked perfectly. Thank you!
March 3, 2014 at 9:47 am #93212frobin
ParticipantWhere do I add the code posted by Indiedog. Do I add it to my functions php file?
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.