Not all post shown with plugin activated
-
Context :
- WP last version, PP Permissions last version
- – The author #2 has 3 posts : 1 published, 2 pending
- If logged as “Editor”, with PP Permission activated, the following code returns wrong results (1 post)
- if logged as “Editor”, without PP Permissions activated (inactive), the following code return correct results (3 posts)
$args = array ( 'post_status' => array('publish','pending', 'inherit'), 'post_type' => 'post', 'posts_per_page' => -1, 'author' => 2, ); $query = new WP_Query($args); if ($query->have_posts()) { echo("# : ".$query->post_count."<br>"); } else { echo("else...."); }There is something I do not understand ! May be wrong config (english is not my language ….)
Help greatly appreciated
thanks - WP last version, PP Permissions last version
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Not all post shown with plugin activated’ is closed to new replies.