wp_query & query_posts only working for administrator
-
I’m unable to figure out why my wp_query and query_posts queries are only working for the administrator. My natural suspicion was it was caching (I’m using WP Total Cache), however the queries are not working correctly for other logged in users, only the admin.
here’s an example:
https://picturesfor.me/album-categories/animalsAll users are seeing all the thumbnails on the left, and all 4 album listings on the right, whereas the admin user only sees the (correct) 2 thumbnails on the left, and 1 album listing on the right.
here is my query running the thumbnails:
$args = array(
'posts_per_page'=> -1,
'tax_query' => array(
array(
'taxonomy' => 'gallery-categories',
'field' => 'tag_ID',
'terms' => $cur_cat_id
)
)
);
and here is my query for the album posts:
$args = array(
'post_type' => 'albums',
'order' => 'DESC',
'tax_query' => array(
array(
'taxonomy' => 'album-categories',
'field' => 'term_id',
'terms' => get_cat_id( single_cat_title("",false) )
)
)
);
- The topic ‘wp_query & query_posts only working for administrator’ is closed to new replies.