Title: Filter Doesn&#8217;t Work for Future Posts
Last modified: May 1, 2020

---

# Filter Doesn’t Work for Future Posts

 *  Resolved [Joelle](https://wordpress.org/support/users/joelle/)
 * (@joelle)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/filter-doesnt-work-for-future-posts/)
 * Hello, this plugin is great and does 99% of what I need. 🙂 However, I’m trying
   to use your filter in the functions.php file to show only future posts and when
   I do that, it shows nothing at all. Any thoughts on this?
 *     ```
       add_filter('dd_carousel_filter_query_args', 'filter_carousel', 10, 2);
       function filter_carousel($args, $carouselID){
           if ($carouselID == 9879){
           $args = array(
               'post_status' => 'future'
               );
           return $args;
           }
       }
       ```
   

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

 *  Plugin Author [thehowarde](https://wordpress.org/support/users/thehowarde/)
 * (@thehowarde)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/filter-doesnt-work-for-future-posts/#post-12766527)
 * Hello. I will check it out and get back to you.
 * Thanks.
 *  Plugin Author [thehowarde](https://wordpress.org/support/users/thehowarde/)
 * (@thehowarde)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/filter-doesnt-work-for-future-posts/#post-12768400)
 * Hi Joelle.
 * Please download the updated plugin. This should fix your issue.
 * Howard
 *  Thread Starter [Joelle](https://wordpress.org/support/users/joelle/)
 * (@joelle)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/filter-doesnt-work-for-future-posts/#post-12774086)
 * Hi there. 🙂 Thanks for looking at that so quickly. I ran your upgrade, but nothing
   has changed. It still shows me only published posts. Is there an option that 
   can be worked into the settings, maybe? like a checkbox option or something so
   people can say “show future, published” or “future” only or whatever? Or maybe
   I’m just doing something wrong, but I can’t figure out how to get it to show 
   me the future posts other than the filter you posted before.
 *  Plugin Author [thehowarde](https://wordpress.org/support/users/thehowarde/)
 * (@thehowarde)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/filter-doesnt-work-for-future-posts/#post-12774317)
 * It does work for me. Maybe you’re doing something wrong? If you’re not logged
   in though, how would a user see the future posts? Either way, the carousel item
   does show, but only a logged in user with view other’s posts would be able to
   see the actual post.
 * Here’s a working version: [https://www.duckdiverllc.com/carousel-test/](https://www.duckdiverllc.com/carousel-test/)
 *     ```
       add_filter('dd_carousel_filter_query_args', 'filter_carousel', 10, 2);
       function filter_carousel($args, $carouselID){
           if ($carouselID == 2139){
           $args = array(
               'post_status' => 'future'
               );
           return $args;
           }
       }
       ```
   
    -  This reply was modified 6 years, 1 month ago by [thehowarde](https://wordpress.org/support/users/thehowarde/).
 *  Thread Starter [Joelle](https://wordpress.org/support/users/joelle/)
 * (@joelle)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/filter-doesnt-work-for-future-posts/#post-12780159)
 * Hmmm… I just copied your snippet posted above and changed it for my carousel 
   and still, it shows nothing. If I remove the snippet, it totally shows all published
   posts. Do I need to check something in the settings? I currently have it set 
   to show latest posts — should I select something else?
 * Lots of sites use future posts to show calendars and they’re not logged in. I
   am logged in and I still don’t see it. We’re showing future posts already on 
   the site using other snippets and plugins. It’s possible it’s a conflict, but
   I can’t imagine with what, we’re just calling a basic query for future posts 
   only. I can email you the link if you want, but you won’t see it. haha!
 *  Thread Starter [Joelle](https://wordpress.org/support/users/joelle/)
 * (@joelle)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/filter-doesnt-work-for-future-posts/#post-12780257)
 * Ah! I needed to set the post_type because it’s not the default. It’s a CPT. That
   worked! Another snippet I’ve got makes it display the nice URL and to everyone,
   regardless of log-in status, so I think were good!
 * Thank you so much for looking at this for me. 🙂

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

The topic ‘Filter Doesn’t Work for Future Posts’ is closed to new replies.

 * ![](https://ps.w.org/dd-post-carousel/assets/icon-128x128.png?rev=1929447)
 * [Custom Post Carousels with Owl](https://wordpress.org/plugins/dd-post-carousel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dd-post-carousel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dd-post-carousel/)
 * [Active Topics](https://wordpress.org/support/plugin/dd-post-carousel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dd-post-carousel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dd-post-carousel/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Joelle](https://wordpress.org/support/users/joelle/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/filter-doesnt-work-for-future-posts/#post-12780257)
 * Status: resolved