loop exclude field value
-
I have a loop:
[loop type=profiles taxonomy=profile-type term=witw field=school_year value=2015-2016]
. Gets all profiles whose profile-type is “witw” and whose school_year value is “2015-2016”. School_year is a custom field.
I need a second loop which gets all profiles whose profile-type is “witw” except those whose school_year value is “2015-2016”. I’ve tried:
[loop type=profiles taxonomy=profile-type term=witw relation=and taxonomy_2=school_year value_2=2015-2016 compare_2=not]
,
[loop type=profiles taxonomy=profile-type term=witw compare=not field=school_year value=2015-2016]
,
and every other combination I can think of. I either get all the “witw” posts or none of them. I’m guessing it’s something about the syntax with a taxonomy and a field value, because I have another loop (which you sent me several months ago) that does this with two taxonomies which works fine, but I can’t figure this one out.
Thanks, Susanhttps://www.ads-software.com/plugins/custom-content-shortcode/
- The topic ‘loop exclude field value’ is closed to new replies.