Excluding an attachment category from a query
-
Hi David
I am using the following shortcode to display a list of recently uploaded documents, but excluding those in a particular category (ID 53):
[mla_gallery columns=1 post_mime_type="application/*" tax_query="array(array('taxonomy' => 'attachment_category','field' => 'term_id','terms' => array('53'),'operator' => 'NOT IN'),)" post_parent=all posts_per_page=10 orderby="modified DESC, title ASC" link="file" mla_markup="ul"]I am getting a strange result: the exclusion of the category only works for logged in users, logged out users can see links to documents in category 53.
Do you have any ideas what might be causing this?
The topic ‘Excluding an attachment category from a query’ is closed to new replies.