Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 119408

briankerrdesign on "[Plugin: Yet Another Related Posts Plugin] Request: Add argument to include posts"

$
0
0

Modified class-cache:

$options = array( 'threshold', 'show_pass_post', 'past_only', 'weight', 'require_tax', 'exclude', 'recent', 'limit', 'post__not_in' );
// WHERE
$newsql .= " where post_status in ( 'publish', 'static' ) and ID != '$reference_ID'";
if ($post__not_in)
	$newsql .= " and ID not in (".join(',', $post__not_in) .")";

Modified call:

yarpp_related(array(
   'post__not_in' => array(270),//ignore posts
   ...
));

Viewing all articles
Browse latest Browse all 119408

Trending Articles