I need some quick help writing a custom wp_query or get_posts query that fetches all posts from a set category and all posts that are set as private.
I'm using this code right now :
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
$query_args = array(
'post_type' => 'post',
'category_name' => 'test',
'post_status' => array('private', 'publish'),
'posts_per_page' => 20,
'paged' => $paged
The problem is that it only fetches posts if they are in category "test"!
I want it to fetch all posts in category test + all posts that are flagged as private even though the private posts have other categories assigned to them.
I'm hoping for a quick fix over chat to get this job done!
6 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön
Good day! I can surely help you out with this WP query :) I'm a WP expert and develop themes/plugins for a living so I can help you out quickly! Come chat!