Soliloquy slider

Community Forums Forums General Discussion Soliloquy slider

This topic is: not resolved

This topic contains 9 replies, has 2 voices, and was last updated by  Loudness 8 months, 2 weeks ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #42288

    Loudness
    Participant
    Post count: 37

    Hi !  Let’s say I want to add the soliloquy slider to the streamline theme right after the “header” section (between the header & menu.  How can I do that ?   Got this code from soliloquy :

    function soliloquy_slider_header_home() {
    if (is_home()) {
        echo do_shortcode('[soliloquy id="88"]');
       }
    };
    add_action('genesis_header', 'soliloquy_slider_header_home');
    

    But where I’m supposed to paste this code ? there is no header.php file in the child theme folder ? Sorry I’m a newb…

    Or is there a simple way to do it ? By a widget or something ? I want the slider to take the full width

    Thanks

    • This topic was modified 10 months, 4 weeks ago by  Loudness.
    • This topic was modified 10 months, 4 weeks ago by  Loudness.
    #42293

    Loudness
    Participant
    Post count: 37

    correction : I want the slider between the menu & main content section.

    #42296

    braddalton
    Participant
    Post count: 7441

    Copy this code from the view raw link and paste the code at the end of your child themes functions.php file using a text editor like Notepad++.

    Here’s the code for after the header if you want to change position.

    You’ll need to replace the 88 with the i.d for your slider which is generated after you add a new slider.

    The width for your slider images should be set to 960px

    The code includes a conditional tag so the slider will only display on the home page.


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #49744

    Loudness
    Participant
    Post count: 37

    Hi

    for any reasons, this code add the slider on all the pages ? Any idea why ?

    #49759

    braddalton
    Participant
    Post count: 7441

    Are you using a static page as your home page?

    If so, change the conditional tag from:

    if (is_home()) {
    

    To

    if (is_front_page() ) {
    

    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #50130

    Loudness
    Participant
    Post count: 37

    Hi Brad

    thanks for all your help. The slider is on all the page, except the home page… ( I want the opposite) here’s the code I’m using :

    function soliloquy_slider_header_home() {
    if (is_front_page() ) {
    echo do_shortcode(‘[soliloquy id="4402"]‘);
    }
    };
    /**
    * @author Brad Dalton – WP Sites
    *
    * @example http://wp.me/p1lTu0-9Th
    */
    add_action(‘genesis_header’, ‘soliloquy_slider_header_home’);

    /** Add soliloquy after header Genesis */
    function wpsitesdotnet_soliloquy_slider_header() {

    if ( function_exists( ‘soliloquy_slider’ ) ) soliloquy_slider( ’4402′ );

    };
    /**
    * @author Brad Dalton – WP Sites
    *
    * @tutorial http://wp.me/p1lTu0-9Th
    */
    add_action(‘genesis_after_header’, ‘wpsitesdotnet_soliloquy_slider_header’);

    /** Change header height */
    add_theme_support( ‘genesis-custom-header’, array( ‘width’ => 960, ‘height’ => 180 ) );

    Resumé : ! want the soliloquy slider on the home page only, after the header, & slider height must be 180px. What is wrong in the code ?

    #50265

    braddalton
    Participant
    Post count: 7441

    Please link to your site.

    Simple change the hook from:

    add_action('genesis_header', 'soliloquy_slider_header_home');
    

    To

    add_action('genesis_after_header', 'soliloquy_slider_header_home');
    

    You may also need the conditional tag from:

    if (is_front_page() ) {
    

    To

    if (is_home() ) {
    

    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #53728

    Loudness
    Participant
    Post count: 37

    Ok after all these change I was able to have the slider only on the homepage, but position of the slider is wrong. I want it to be between the menu & the main content.

    see : http://www.graphical-media.com/abat2013 (beta site)

    Code I’m using :`/** Change header height */
    add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 180 ) );

    // ADD SOLILOQUY SLIDER**//
    function soliloquy_slider_header_home() {
    if (is_front_page() ) {
    echo do_shortcode('[soliloquy id="4402"]');
    }
    };
    add_action('genesis_header', 'soliloquy_slider_header_home');

    function wpsitesdotnet_soliloquy_slider_header() {if ( function_exists( 'soliloquy_slider' ) ) soliloquy_slider( '4402' );};`

    Any idea how to solve that ?

    • This reply was modified 8 months, 2 weeks ago by  Loudness.
    • This reply was modified 8 months, 2 weeks ago by  Loudness.
    • This reply was modified 8 months, 2 weeks ago by  Loudness.
    • This reply was modified 8 months, 2 weeks ago by  Loudness.
    #53734

    braddalton
    Participant
    Post count: 7441

    Simple change the hook from

    genesis_header

    to another.


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #53740

    Loudness
    Participant
    Post count: 37

    Worked ! Thanks !

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

You must be logged in to reply to this topic.