Title: exclude current post
Last modified: September 29, 2019

---

# exclude current post

 *  Resolved [lola99](https://wordpress.org/support/users/lola99/)
 * (@lola99)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-current-post-15/)
 * 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)

 *  [Rafik](https://wordpress.org/support/users/rafikwp/)
 * (@rafikwp)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-current-post-15/#post-11981700)
 * 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](https://wordpress.org/support/users/lola99/)
 * (@lola99)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-current-post-15/#post-11981857)
 * 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…
 *  [Rafik](https://wordpress.org/support/users/rafikwp/)
 * (@rafikwp)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-current-post-15/#post-11982167)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-responsive-recent-post-slider_9c9a9b.
   svg)
 * [WP Responsive Recent Post Slider/Carousel](https://wordpress.org/plugins/wp-responsive-recent-post-slider/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-responsive-recent-post-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-responsive-recent-post-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-responsive-recent-post-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-responsive-recent-post-slider/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Rafik](https://wordpress.org/support/users/rafikwp/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/exclude-current-post-15/#post-11982167)
 * Status: resolved