Thanks for taking the time to try and adapt my suggestions and for your update. I think I have a better idea of your goal.
Based on your first post I thought “information-leaflet+not-expired+neurology
” was a single term slug. Now I think you intended it to be “ information-leaflet
” AND ” not-expired
” AND ” neurology
“, i.e., items must be assigned to all three terms to be included. Is that right? If so, cleaning up the terms and adding a parameter should give you what you want. Here’s an update of my original suggestion:
[mla_gallery]
mla_markup=information-leaflets
tax_query="array(
'relation' => 'AND',
array(
'taxonomy' => 'attachment_tag',
'field' => 'slug',
'terms' => array('information-leaflet', 'not-expired', 'neurology'),
'operator' => 'AND'
)
array(
'taxonomy' => 'attachment_tag',
'field' => 'slug',
'terms' => 'headache-clinic',
'operator' => 'NOT IN'
)
)"
[/mla_gallery]
Of course, your ID-based alternative will also work if you add the ‘operator’ parameter to the query.
I hope that completes the solution; let me know if you have any problems or further questions.