Events Made Easy › Forums › Bug fixed or feature request implemented › NotCategory in Events List Shortcode
Tagged: notcategory
- This topic has 11 replies, 2 voices, and was last updated 10 years, 1 month ago by Anonymous.
-
AuthorPosts
-
Thu 25 Sep 2014 at 04:40 #52885AnonymousInactive
It would be helpful to have the “notcategory” attribute available for the [eme_events] shortcode as it is for the filter form shortcode.
Thanks!
Thu 25 Sep 2014 at 11:12 #52886FrankyKeymasterHmmm … apparently I overlooked to document it, but it should already just work
Thu 25 Sep 2014 at 12:40 #52890AnonymousInactiveI figured that was the case, but it didn’t work for me. Instead of excluding those categories that I entered, the list showed all.
Thu 25 Sep 2014 at 14:47 #52891FrankyKeymasterok, moving to bugs then
Thu 25 Sep 2014 at 22:58 #52893FrankyKeymasterI just took a hard look at notcategory, but it should be ok.
I did change some small parts, can you test this:
http://plugins.trac.wordpress.org/changeset/996853
Also: a usage example (events with their cats, and your shortcode) might help.Fri 26 Sep 2014 at 13:15 #52895AnonymousInactiveSorry it is being difficult, but still not working…
I updated my plugin with your changes, set my shortcode to “[eme_events paging=1 limit=0 scope=this_year notcategory=2,8]“, and simplified my event list code to:
Default event list format header
<table class="eme-event-list-table"> <thead> <tr> <th class="column1"><h2>Date</h2></th> <th class="column2"><h2>Name</h2></th> <th class="column3"><h2>Leader</h2></th> <th class="column4"><h2>Location</h2></th> <th class="column5"><h2>Type</h2></th> <th class="column6mobile"><h2>Location</h2></th> </tr> </thead> <tbody>
Default event list format
<tr> <td class="column1">#_{M j}[eme_if2 tag="#ESC_{M j Y}" notvalue="#ESC@_{M j Y}"] – [eme_if3 tag="#ESC_{M}" notvalue="#ESC@_{M}"]#@_{M }[/eme_if3]#@_{j}[/eme_if2]</td> <td class="column2">#_LINKEDNAME</td> <td class="column3">#_ATT{Leader}</td> <td class="column4"><a href="#_EVENTPAGEURL">#_TOWN</a></td> <td class="column5">#_CATEGORIES</td> <td class="column6mobile"><a href="#_EVENTPAGEURL">#_TOWN</a></td> </tr>
Default event list format footer
</tbody> </table>
I am still getting a list that includes all categories…
Fri 26 Sep 2014 at 15:22 #52896FrankyKeymasterCould you try
[eme_events paging=1 limit=0 scope=this_year notcategory=2+8]
?Fri 26 Sep 2014 at 15:56 #52897AnonymousInactiveThat works.
Fri 26 Sep 2014 at 16:23 #52898FrankyKeymasterThat’s why I originally didn’t include the “,” in the parsing for notcategory: in fact that reads: “show me events not in cat 2 or 8”, while you need “not in cat 2 and not in cat 8”
It’s a bit weird with a negation …Fri 26 Sep 2014 at 16:32 #52899AnonymousInactiveActually, “show me events not in cat 2 or 8″ is what I need, but someone else may need the “not in cat 2 and not in cat 8″ ability.
…if I’m understanding correctly – lol. Confusing…
Fri 3 Oct 2014 at 00:30 #52968FrankyKeymasterOk, since this works, I’ll close the double-double-double negation thing before it gets us in an infinite time loop 🙂
Fri 3 Oct 2014 at 19:05 #52979AnonymousInactiveI am using notcategory=X+X+etc… wherever I need it and all is working.
But for consistency’s sake, would you want it to be notcategory=X,X,etc… instead?
This would be consistent with the “category=” in the doc.
category limits the events shown to those of a certain category ID. You can specify multiple categories for AND and OR limitations: “1,3” for events in category 1 OR 3, “1+3″ for events in category 1 AND 3. Use the literal ‘none’ if you want to filter on events without category: “1,none” would mean to show events in category 1 or without category.
Maybe I’m still confused… 🙂 But things are working with the +’s.
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.