Filtering loop query
-
Hello,
I’m writing aplugin that im trying to filter out posts from the loop via certain if.function add_my_stuff($title)
{
global $wpdb;
global $post_privacy;
global $id;
global $authordata;
global $postdata;
global $post;if ($post_privacy->privacy == “private”) {
$title = “Private Post”.$content;
}
return $title;
}add_filter(‘the_title’,’add_my_stuff’);
this works perfect, But i wish to completly wipe out the post from the loop and not just alter it.
How can i do that?, I searched the hooks and i didnt find anything.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘Filtering loop query’ is closed to new replies.