Replies: 0
Guys,
I currently have a custom post status “archive” that is public but I don´t want to appear in related posts.
There I want to know if it is possible to exclude posts from the related posts functionality based on the post status. I have tried this:
function jetpackme_filter_exclude_status( $filters ) {
$filters[] = array( ‘not’ =>
array( ‘post_status’ => ‘archive’ )
);
return $filters;
}
add_filter( ‘jetpack_relatedposts_filter_filters’, ‘jetpackme_filter_exclude_status’ );
But to no avail, any help would be appreciated
pete