- This topic has 8 replies, 2 voices, and was last updated 3 years, 8 months ago by .
Viewing 9 posts - 1 through 9 (of 9 total)
Viewing 9 posts - 1 through 9 (of 9 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Filterform in specific categories
Hi Franky.
I have a question. I have 3 main categories of events. Indoors (37), Outdoors (38) and Online (36).
I have separate pages for each of these three categories.
For example, I have a page for Online events.
I use the shortcode: [eme_events template_id=2 category=36 notcategory=37,38] (36 being the Category ID for Online)
I have 8 other categories (Music, Film etc.)
When I am on the page for Online Events I am using the Filterform shortcode, so that I can further filter (like subcategories) [eme_filterform category=39,40,41,42,43,44,45,46]
However, when I am on the Online Events page, and the shortcode displays only events from Category 36, as soon as I choose a (sub) category from the filter (for example Music), it displays events from the other two main categories (Indoors (37) and Outdoors (38)) even though I have ‘notcategory’ in the eme_events shortcode.
Is there some way around this?
Thanks
Jamie
The notcategory should still be taken into account … I’ll test this myself later on
Thanks Franky
I’m sorry, but I’m not able to reproduce this problem.
Hi.
How strange. Thanks for looking into it anyway
Jamie
If you really want: give me some temp access to your site to see the problem there (and tell me how to see it happen) or otherwise I’ll close this bug for now.
Hi Franky.
Thank you, there’s no need. I came up with a workaround.
I assigned class names for each category to the events elements and then filtered the elements using this method: https://www.w3schools.com/howto/howto_js_filter_elements.asp
Thanks again
Jamie
Hi
Just in case anyone else comes across this issue. I found that it was also solved by not comma separating the category IDs and using the ‘+’ instead
So instead of:
[eme_events template_id=2 category=36 notcategory=37,38]
I used:
[eme_events template_id=2 category=36 notcategory=37+38]
However, if any events are marked in two of the categories simultaneously, they won’t appear.
Ah yes, I tested with only 1 notcategory. The fact you need “+” is logical there because that translates to “AND NOT IN” (logically speaking) while “,” translates to “OR NOT IN” (which is illogical for a “not”)