Forums

AnythingSlider for WordPress
[resolved] shortcode for outside the post editor (4 posts)

  1. franso
    Member
    Posted 1 year ago #

    Hello!

    I am trying to use <?php do_shortcode('[anything_slides]'); ?>
    in my index.php file but there is no slider.

    I only works with Pages when I use [anything_slides].

    Can someone help me with this ?

    http://wordpress.org/extend/plugins/anythingslider-for-wordpress/

  2. jacobdubail
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Franso,

    You'll need to echo the do_shortcode call. do_shortcode() returns to PHP, but does not echo. Try adding an echo call and let me know what happens.

    Thanks,
    Jacob

  3. franso
    Member
    Posted 1 year ago #

    I have tried it like here below, but still without success.
    <?php echo do_shortcode('[anything_slides]'); ?>

  4. jacobdubail
    Member
    Plugin Author

    Posted 1 year ago #

    hmmmm. Really not sure what could be going on. Make sure you aren't using it within the Loop. Because it sets up a new loop to gather all of the slides, be sure to put it before or after the main loop.

    Also, I just pushed a new version of the plugin. Try upgrading and let me know if you get it to work.

    Thanks!

    -Jacob

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic