Events Made Easy › Forums › Bug fixed or feature request implemented › Display Categories – AND not OR
- This topic has 9 replies, 5 voices, and was last updated 13 years, 4 months ago by Franky.
-
AuthorPosts
-
Mon 4 Oct 2010 at 19:19 #42129AnonymousInactive
So I’ve figured out how to display events matching multiple categories, using [events_list category=17 category=42]. But, the problem here is that it shows me events that match category 17 OR category 42, but I want it to show me events that match category 17 AND category 42.
Now, the reason I’m doing this is important only because someone might have a better solution. I want to be able to show, on a single page, something like this:
One-Time Sporting Events:
**Shows events that are not recurring.**
All Sporting Events:
**Shows all events regardless of recurrence.**
So I have a NonRecurring category to accomplish this. Thoughts?
Mon 4 Oct 2010 at 22:27 #44918FrankyKeymasterAND is currently not possible, but you can always try changing line 836 in dbem_events.php from
conditions [] = "(".implode(' OR', $category_conditions).")";
to
conditions [] = "(".implode(' AND', $category_conditions).")";
I’ll put this on the feature request list, shouldn’t be that hard to add …
Tue 5 Oct 2010 at 00:43 #44919AnonymousInactivePerfect, that worked. Look forward to the future enhancement.
Tue 5 Oct 2010 at 01:28 #44920AnonymousInactiveOh, and a HUGE thank you!
Tue 5 Oct 2010 at 08:03 #44921FrankyKeymasterBtw: this works for OR categories: [events_list category=1,3]
And in the trunk version I added this for AND: [events_list category=1+3]
Mon 6 Jun 2011 at 19:42 #44922AnonymousInactiveI can’t get the AND functionality to work, I have this [events_list category=1+3], but it’s display a list of all events, not just those in category 1 and 3. I’ve found the code in eme_events.php for the AND functionality, but it’s not working for me. Any suggestions?
Mon 6 Jun 2011 at 20:40 #44923FrankyKeymasterThis is/was a new bug, fixed now in trunk. You can download the latest version here:
http://downloads.wordpress.org/plugin/events-manager-extended.zip
Tue 7 Jun 2011 at 03:19 #44924AnonymousInactiveFirst,Thanks for your share!
Does Louis Vuitton have an outlet? Who really knows but you can find some really great deals whether you are looking for a LV authentic or replica.
For more information please visit here
louis vuitton monogram canvas artsy gm
guiyichm0607
Fri 8 Jul 2011 at 15:47 #44925AnonymousInactiveI’m working with version 3.3.5 and still it doesn’t perform right. The operand + works like OR, and even worst. It’s like you would indicate to include all categories!
I’m using it in a shortcode in a page [events_list category=1+3] and it shows all the categories.
Thanks a lot for you help (and awesome pluging)
Regards
Fri 8 Jul 2011 at 19:20 #44926FrankyKeymasterThere’s a bug in 3.3.5 which has been fixed for the next version:
* Bugfix: AND categories for [events_list] were no longer working and resulted in all categories being used
So: wait for the next release or update to trunk: http://downloads.wordpress.org/plugin/events-manager-extended.zip
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.