• I’m trying to use the event list shortcode to display events from one category and tagged with one tag but it doesn’t work with the AND logic. IF I remove either categories or tags form the shortcode it works fine but can’t filter using both

    My shortcode is:

    [event_rocket_list categories="fall-2015" tags="itinerary" logic="and"]

    I’ve also tried using category and tag singular parameters with no luck.

    https://www.ads-software.com/plugins/event-rocket/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Barry

    (@barryhughes-1)

    Hi there kevibethink,

    Strangely enough it works as expected for me when I test this out. Would it be possible to see a live example of the problem? Have you tried testing on an otherwise clean install / deactivating other plugins etc, so as to eliminate the possibility of a conflict?

    Thread Starter kevibethink

    (@kevibethink)

    I sent you a message on your site, but if you can help me out there I’ll post the answer here so the community can see it. Thanks!

    Plugin Author Barry

    (@barryhughes-1)

    Apologies – I somehow missed the blindingly obvious here.

    I noticed you were using logic="and" – which works with [embed_event] – and somehow glazed over the fact you are actually using [event_rocket_list], which is a simple wrapper around the advanced list widget supplied by Events Calendar PRO.

    In this case then what you may be able to do is use operand="AND" with your shortcode and that may get you where you need to be. Please note, though, that I have not tested this out (it’s based on nothing but a quick reading of the PRO source code).

    As a sidenote, it may seem inconsistent that the widget shortcodes accept one set of parameters and [embed_event] a quite different set — and I do appreciate that can add a level of confusion.

    The reason for this, though, is that the widget shortcodes are very thin, lightweight layers wrapping around existing widgets and so the way we interact with them is largely dictated by the widget implementations themselves, whereas [embed_event] was in some ways drawn on a blank canvas.

    In any case, I hope that helps ??

    Thread Starter kevibethink

    (@kevibethink)

    That did work. Thank you. Is there a way to filter in this way using a custom taxonomy? I tried changing the shortcode to use event_tag=”itinerary” but the $filters array doesn’t pick it up at all.

    Plugin Author Barry

    (@barryhughes-1)

    The widget itself – the advanced list widget that ships with PRO – doesn’t directly support filtering with anything except event categories and regular post tags.

    It’s possible you could customize things with some natty use of the available action/filter hooks (not just within the advanced list widget code, but within WP’s widget and query code, too).

    Once you figure that part out, it’s possible you could control things from the shortcode by adding an extra parameter – check out the shortcodes/widget-adjusters.php file for examples of doing so ??

    (Do remember also that it’s not unlikely official versions of these shortcodes will be available in The Events Calendar/Events Calendar PRO in one of their future releases, at which point Event Rocket’s own widget wrappers will be deprecated, though they won’t immediately be removed.)

    Thread Starter kevibethink

    (@kevibethink)

    Actually, the advanced widget does support filtering on custom taxonomies as I tested it out using the widget itself.

    I also just finished editing the plugin to get it working with a new parameter. I basically just duplicated all the plugin code I could find that contained the post_tag logic and edited it to use event_tag also. It seems to be working just fine. Not the most elegant solution but it’ll get me by until this is supported natively in the events calendar plugin.

    Thanks again for your help and quick replies.

    Plugin Author Barry

    (@barryhughes-1)

    Actually, the advanced widget does support filtering on custom taxonomies as I tested it out using the widget itself.

    Ah yes, you’re quite right. So long as you’ve registered them for use with events, yes, they do indeed work as expected ??

    Glad it’s all working, even if it’s a temporary measure until something more elegant is possible!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Event List with AND logic not working’ is closed to new replies.