wordpress - WP_Query to include all posts from category and also include all private posts (private posts may not be in category that was included) -


i've been struggling wp_query work want to.

i want fetch posts category test , fetch posts flagged private, thing posts flagged private may not in category test.

i cannot work, i've tried several of queries without luck, latest 1 came closest success one:

  $args = array(   'post_status' => array('private, publish'),   'relation' => 'or',    'category_name' => 'test' ); 

this 1 seem fetch posts in test category, posts private , outside test category not displayed.

any ideas?


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -