WordPress.org

Ready to get started?Download WordPress

Forums

SlideDeck 2 Lite Responsive Content Slider
Code for Implementing Only on the Home Page? (4 posts)

  1. goosenissley
    Member
    Posted 1 year ago #

    Hey! I've successfully added the shortcode to render the slider on my site in index.php... but is there an extra snippet of code I can use to render it ONLY on my home page... and not on every other archive page?

    My code right now is...

    <?php echo do_shortcode( "[SlideDeck2 id=5913]" ); ?>

    Thanks for reading!

    http://wordpress.org/extend/plugins/slidedeck2/

  2. LingoSam
    Member
    Posted 1 year ago #

    <?php if(is_front_page() ) { ?>
    <?php echo do_shortcode( "[SlideDeck2 id=5913]" ); ?>
    <?php } ?>

    Should do the trick...

  3. WP Sites - Brad Dalton
    Member
    Posted 1 year ago #

    I've written a complete guide to installing Slide Deck in any location in any theme.

    Or you could use this:

    Paste this code in your header.php file

    <?php
    if (is_home()) {
    echo do_shortcode('[SlideDeck2 id=007]');
    }
    ?>

    Change the i.d (007) to your own.

    Or use this code if you're using a static page as your home page rather than the default.

    <?php
    if (is_front_page() ) {
    echo do_shortcode('[SlideDeck2 id=007]');
    }
    ?>
  4. darwood
    Member
    Posted 1 year ago #

    Try this if the above fails.

    <?php if( is_front_page() && !is_paged() ) : ?>
        <div id="SlideDeck2">
    <?php echo do_shortcode('[SlideDeck2 id=1673]'); ?>
        </div>
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.