• Resolved lola99

    (@lola99)


    Hello
    Thanks for your plugin, could you please let me know if there is a way to exclude current post from the slider?

    Thanks
    Lola

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thanks for reaching here.

    You can use “hide_post” parameter Ex:- [recent_post_slider hide_post="post_id"]
    Here “post_id” will be your current post ID

    Note:- Please do not copy and paste the shortcode parameter because it will cause the quote(“) issue, please write manually.

    Please let me know if you have any other query.

    Thanks,

    Thread Starter lola99

    (@lola99)

    hi
    i meant exclude automatically the current post from the slider, i have no way to setup the plugin with a specific post ID as i use the php code to insert it directly on the template…

    Hello,

    Try this code in your template.

    <?php 
    $current_post = get_the_ID(); 
    echo do_shortcode('[recent_post_slider hide_post="'.$current_post.'"]'); 
    ?>

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘exclude current post’ is closed to new replies.