Removing specific related posts not working :(
-
Hi,
I’m having an issue removing some specific pages from my recommendations. Here is my function:
//Add the post ids of posts or pages you do not want to appear in the recommendations function jetpackme_exclude_related_post( $exclude_post_ids, $post_id ) { // $post_id is the post we are currently getting related posts for $exclude_post_ids[] = 6956; // Exclude Welcome to Jacksonville Distance Presentation $exclude_post_ids[] = 6954; // Welcome to TWS Distance Presentation $exclude_post_ids[] = 6959; // Welcome to TWSTC Distance Presentation return $exclude_post_ids; } add_filter( 'jetpack_relatedposts_filter_exclude_post_ids', 'jetpackme_exclude_related_post', 20, 3 );
I’m also using the rawcode and building out the recommendations on these pages, not sure if that affects anything. I’ve double checked the post ids from the urls, not sure what else to.
Thanks guys!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Removing specific related posts not working :(’ is closed to new replies.