kylephillips / favorites

Simple and flexible favorite buttons for any WordPress post type.
https://favoriteposts.com
224 stars 85 forks source link

Filtering with post types is not working #70

Closed YossiAharon closed 7 years ago

YossiAharon commented 7 years ago

When trying filtering the output of the_user_favorites_list to a specific custom type, it doesn't work. I tried also to use the shortcode and "post_types" with the specific post type that I want to include but it doesn't work either.

yovo commented 7 years ago

i also have same issue while trying to filter a custom type

kylephillips commented 7 years ago

Filter parameters are not available in the shortcode.

When using them in the function, the post type(s) should be passed as an array, inside the filters array:

$filters = array('post_type' => array('post')); the_user_favorites_list($user_id = null, $site_id = null, $include_links = true, $filters = $filters, $include_button = true, $include_thumbnails = true);