admin管理员组

文章数量:1122846

For Avoid Duplication of Posts

Exclude the (Recent Newest Post) from their Category. But when a new post is published again in a similar or another category, the old post should be included again in their category and the new again excluded from their category.

Remember: Only New Recent Post Exclude not 1st Post via Offset=>1 etc. Maybe post_not_in => will work Please Help.

$args=array(
'cat' => 735,
'orderby'=> 'post_date',
'order' => 'DESC',
'post__not_in' => array($post->ID),
'posts_per_page'=> 1, 
'offset'  => 0,
'post_type' => 'post',
'post_status' => 'publish',
'caller_get_posts'=> 1
);
$the_query = new wp_query( $args );

本文标签: