Make Slider homepage widget available on all pages

Community Forums Forums Design Tips and Tricks Make Slider homepage widget available on all pages

This topic is: resolved

Tagged: ,

This topic contains 12 replies, has 3 voices, and was last updated by  henryyoung101 1 year, 7 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #16615

    MakeYourselfVisible
    Participant
    Post count: 33

    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

    #16619

    SoZo
    Moderator
    Post count: 1573

    You 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

    #16629

    MakeYourselfVisible
    Participant
    Post count: 33

    Thanks SoZo. I’m kind of a programming n00b but do you mean like this?

     

    <?php genesis_after_header(); ?>

    (copied function from home.php)

    #16631

    SoZo
    Moderator
    Post count: 1573

    Which version of the theme are you using? What is your URL?


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #16633

    MakeYourselfVisible
    Participant
    Post count: 33
    This reply has been marked as private.
    #16637

    SoZo
    Moderator
    Post count: 1573

    Ok, made me think you were using 1.0 since you had php open/close tags in your code.

    Remove this from home.php
    [php]genesis_widget_area( ‘home-slider’, array(
    ‘before’ => ‘<div class="home-slider widget-area">’,
    ) );[/php]
    and then add this to functions.php
    [php]add_action(‘genesis_after_header’, ‘home_slider’);
    function home_slider(){
    genesis_widget_area( ‘home-slider’, array(
    ‘before’ => ‘<div class="home-slider widget-area">’,
    ) );
    }[/php]

    To learn more see the intro to hooks


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #16639

    MakeYourselfVisible
    Participant
    Post count: 33

    That 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?

    #16643

    SoZo
    Moderator
    Post count: 1573

    Ah, 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

    #16681

    MakeYourselfVisible
    Participant
    Post count: 33

    I 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.

    #16683

    SoZo
    Moderator
    Post count: 1573

    Looks right to me. Try clearing your browser cache.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #16684

    MakeYourselfVisible
    Participant
    Post count: 33

    Yes 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

    #16685

    SoZo
    Moderator
    Post count: 1573

    You’re welcome :)


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #18553

    henryyoung101
    Participant
    Post count: 5

    Would 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

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.