Plugin Author
Ajay
(@ajay)
There isn’t a way to stop the tracking by post type but when creating the popular posts you can only include the post types you want.
How can I exclude posts by the code below.
$settings = array(
'daily' => TRUE,
'daily_range' => 30,
'limit' => 20,
'strict_limit' => FALSE,
);
$topposts = get_tptn_pop_posts( $settings ); // Array of posts
$topposts = wp_list_pluck( (array) $topposts, 'postnumber' );
// args
$toppost_args = array(
'post__in' => $topposts,
'orderby' => 'post__in',
'posts_per_page' => 10,
'post__not_in' => array(6828),
'ignore_sticky_posts' => 1,
);
I tried post__not_in But it does not work.
I have added the article id in the section: Exclude display on these post IDs
It also does not work.
Thanks
-
This reply was modified 6 years, 1 month ago by
seanpaulfx.
Plugin Author
Ajay
(@ajay)
For $settings, you can also use the post_types attribute with a comma separated list of post types.
The shortcode parameters work here: https://webberzone.com/support/knowledgebase/top-10-shortcodes/