• Resolved JorgenM

    (@jorgenm)


    First of all this plugin is really great – thanks a lot!

    I have made a customised list of favorites using this:

    $favorites_query = new WP_Query(array(
    ‘post_type’ => array( ‘movies’, ‘shows’ ),
    ‘posts_per_page’ => -1,
    ‘post_status’ => array( ‘publish’, ‘future’ ),
    ‘ignore_sticky_posts’ => true,
    ‘post__in’ => $favorites,
    ‘paged’ => $paged

    but the listing won’t show any future posts! Only published. I have made a page with future posts and here the button shows “unfavourite” after click and the counter tells one more favourite has been added.. so the function works.. any suggestions why the favorite-listing won’t show future posts?

    • This topic was modified 7 years, 9 months ago by JorgenM.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kyle Phillips

    (@kylephillips)

    I’ve added a filter parameter for status in the latest version, 2.1.4.

    Once you install that, you can pass it in to your get_user_favorites function:

    $filters = array(
    ‘status’ => array(‘publish’,’future’)
    );
    $favorites = get_user_favorites(null, null, $filters);

    Thread Starter JorgenM

    (@jorgenm)

    Thanks so much, Kyle – spending your time on a rather specific feature!!

    I updated and tried it but it didn’t work out in first place – I think I will have to go through my code again – found out at the same time that it only will list “movies” if I already have a “show”-post favourited – which indicates I have done something wrong somewhere
    But at least I now know that it’s possible to show future posts in the favorite listing – thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Favorite list show future posts’ is closed to new replies.