Events Made Easy Forums How do I … Conditional tags in a sidebar?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #44060
    Anonymous
    Inactive

    Hi,

    I’m using your very useful plug-in on my page to organise and display events. However, I’ve come across an issue that I could do with some/advice with.

    I have a number of different categories, and I would like the theme sidebar/widget area show future events for the same category of the current event being viewed. E.g. if a football match event page is viewed, then I would like the widget area to show future ‘football’ events.

    I can use the [events_list category=6] short-code within the widget area to display events for a specific category. However, I cannot work out how to make this dependent upon the current event being viewed.

    If I try :

    [events_if tag='#ESC_CATEGORIES' contains='Golf']

    [events_list category=6]

    [/events_if]

    then nothing is displayed – it’s as if the [events_if is not being processed in the widget area? But I know something is being processed in the widget area since the [events_list] short-code on its own will work.

    Or alternatively, if this is not possible, could the permalinks be changed from events/ID/EVENTNAME to events/CATEGORY/ID/EVENTNAME? In this case, I can use a context-widget plug-in to selectively display widgets based on the URL.

    Thanks, Andy

    #50742
    Franky
    Keymaster

    events/cat/<cat_name> already exists as a permalink

    [events_if] only works inside events, not surrounding them.

    #50743
    Anonymous
    Inactive

    Thank you for your reply.

    Re: permalinks. I was thinking about the permalink URL for a event. So currently, an events URL could be http://…/wordpress/events/6/match_1 and http://…/wordpress/events/7/match_2 etc.

    Whereas if the events permalink could be changed to include the category then these would become http://…/wordpress/events/football/6/match_1 and http://…/wordpress/events/football/7/match_2.

    A context widget would then be able to conditionally disaplay a football-specific widget based on a URL search for events/football.

    #50744
    Franky
    Keymaster

    The problem is: what with events in more than one cat? They would have more than one permalink, then it would be impossible which one to show for e.g. basic [event_list] shortcodes.

    What *could* be done: when viewing a single event, I could detect the event id, and based upon that I could show other events in the same category (or categories). But this would only be possible when viewing a single event …

    Otherwise I would say to just create different pages for each category, and conditionally show the widget restricted to the same category per page as well.

    #50745
    Anonymous
    Inactive

    Must admit didn’t think about events in multiple categories!

    When you mention that the event-id *could* be detected – is this likely to be implemented anytime soon?

    Thanks for your replies.

    #50746
    Franky
    Keymaster

    Make a feature request, I’ll start working on new features in 2 weeks 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top