Community Forums › Forums › Archived Forums › Design Tips and Tricks › Make Slider homepage widget available on all pages
- This topic has 12 replies, 3 voices, and was last updated 11 years, 10 months ago by henryyoung101.
-
AuthorPosts
-
January 30, 2013 at 8:06 pm #16615MakeYourselfVisibleParticipant
Hi there,
I'm using the Executive Child theme and I'm wondering how to get the slider home-page widget area to become available on all pages? Basically I want the slider to show on all pages...same slideshow is fine.
Thanks!
David
January 30, 2013 at 8:11 pm #16619SoZoMemberYou would need to move the slider widget area function from home.php and put it into functions.php in a new function using the after_header hook.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 30, 2013 at 8:26 pm #16629MakeYourselfVisibleParticipantThanks SoZo. I'm kind of a programming n00b but do you mean like this?
<?php genesis_after_header(); ?>
(copied function from home.php)
January 30, 2013 at 8:32 pm #16631SoZoMemberWhich version of the theme are you using? What is your URL?
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 30, 2013 at 8:34 pm #16633MakeYourselfVisibleParticipantThis reply has been marked as private.January 30, 2013 at 8:39 pm #16637SoZoMemberOk, made me think you were using 1.0 since you had php open/close tags in your code.
Remove this from home.php
genesis_widget_area( 'home-slider', array( 'before' => '<div class="home-slider widget-area">', ) );
and then add this to functions.php
add_action('genesis_after_header', 'home_slider'); function home_slider(){ genesis_widget_area( 'home-slider', array( 'before' => '<div class="home-slider widget-area">', ) ); }
To learn more see the intro to hooks
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 30, 2013 at 8:47 pm #16639MakeYourselfVisibleParticipantThat worked for getting the slider on all pages! Unfortunately it didn't take the styling with it. Will I have to copy over the other functions that pertain to home_slider from home.php to functions.php as well?
January 30, 2013 at 8:53 pm #16643SoZoMemberAh, yes. Now it's outside the content div so go into the style sheet and find the slider rules starting on line 456 and change the #content in all the selectors to #wrap, e.g.
#content #genesis-responsive-slider
becomes
#wrap #genesis-responsive-slider
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 30, 2013 at 10:38 pm #16681MakeYourselfVisibleParticipantI changed all instances of #content to #wrap but it's still not formatting. Anything else I need to move over to functions.php? There's a couple other things calling home-slider in home.php.
January 30, 2013 at 10:41 pm #16683SoZoMemberLooks right to me. Try clearing your browser cache.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
January 30, 2013 at 10:46 pm #16684MakeYourselfVisibleParticipantYes that is it! Thank you Sozo! They need a beer-pal website so I can send you a cold one. Much appreciated.
The only issue now is how it looks in IE9. I will look through the forums to see if anyone's run into any styling problems with IE9.
Thanks again!
David
January 30, 2013 at 10:47 pm #16685SoZoMemberFebruary 6, 2013 at 6:13 pm #18553henryyoung101MemberWould it be the same to add the "Home #1" through #4 widget area (below "Home Featured" widget area)Â on another page? Â (in Outreach theme)
http://crossings.direcconnec.com/?page_id=13
My Goal is to have an main image area where the slider is currently is and a small slider to the right on Home page.  This was done by  setting the "front page displays" to "static page".  But I loose the Home#1 - #4 areas by doing this.
An alternative is leaving the default "Reading" settings and add another widget area next to the slider. Â I could do this but so far unable to shrink the slider to make room for another widget to line-up horizontally.
Thanks,
Henry -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.