Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Gabor

    (@nextendweb_gabor)

    Hi ray-zin!

    Our plugin is working with shortcodes in the pages and posts, and as I see this example plugin is only putting his slider into a fixed position, and it’s giving a z-index:-1; to it, and that is putting it to the background, which you could do too with the full page type: http://www.nextendweb.com/demo/smartslider2/type/full-page

    just switch your post or page to see the html code, and use our slider’s shortcode like this:
    <div style=”position:fixed;top:0;bottom:0;left:0;right:0;z-index:-1;”>
    [smartslider2 slider=”100142″]
    </div>

    Thread Starter ray-zin

    (@ray-zin)

    Hiya. Thanks for your prompt reply. The above won’t work for me as I don’t have a page or post to put the shortcode into as its on the homepage. So I’d probably need to somehow add the php code to the homepage php?

    I’m trying to add this to the studiopress child theme agentpress.
    See: http://my.studiopress.com/themes/agentpress/#demo-full

    Thanks.
    R.

    Plugin Author Gabor

    (@nextendweb_gabor)

    Yes, in that case you would have to put it into the php code. Since it is a fixed position, it doesn’t really matter, where you put it, because it will be positioned based on the window. I would say, put it right after the <body> part, it’s probably in the header.php file of the theme, and use the WordPress’ do_shortcode function to make the shortcode, also with the WordPress’ is_home and is_front_page functions you can check, if you are on the homepage, so only then would be the slider there:
    <?php
    if(is_home() || is_front_page()){
    echo ‘<div style=”position:fixed;top:0;bottom:0;left:0;right:0;z-index:-1;”>’;
    echo do_shortcode(‘[smartslider2 slider=”1″]’);
    echo ‘</div>’;
    }
    ?>

    This would put it, where the image of the sofa is.

    Thread Starter ray-zin

    (@ray-zin)

    Hi there. As the child theme does not have a header.php file I tried to put the PHP shortcode at the top of front_page.php.

    However… what happens is that all the images in the slider are lined up below each other, 2 seconds later they all disappear. When I try to put it elsewhere in the code nothing happens. Both the slider and the website do not show and sometimes it breaks the code. Only when I put it in a post or page does it show as a gallery slider that still wont be in the background full width.

    I also tried to put your PHP shortcode in the front_page.php it behaves in the same manner as the above mentioned.

    Please advise what else I can try.
    Thanks.
    R.

    Plugin Author Gabor

    (@nextendweb_gabor)

    That happens, when the website’s code ends because of some php code before the </body> and </html> ending, so it must be in a wrong position. Not sure about the post/page why doesn’t work, please send me an admin account to your website to this email address, so I could check out, what is going on: support@nextendweb.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘smart slider 2 as full width background slider?’ is closed to new replies.