Events Made Easy Forums Generic Event list not shown any more

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #59595
    Anonymous
    Inactive

    Hi Franky,
    I am using your plugin on a Site where workshops on different topics are offered. These topics are assigned to different pages and I show all related upcoming events in the sidebar. Because I don’t want to get a message when no event is offered, I used a custom code instead of your widget:
    <?php
    if (is_page (2) || is_child(2) || is_ancestor(2)) {
    if (eme_are_events_available($scope = “future”, $order = “ASC”, $location_id = “”, $category = 1)) {
    echo (‘<h2 class=”widgettitle”>VERANSTALTUNGEN ZUM THEMA GEWALT</h2>’);
    eme_get_events_list(“limit=5&category=1&order=ASC&format=<li class=dateandtown>#_STARTDATE <span style=color:#cb5924>/</span> #_TOWN<li class=eventtitle>#_LINKEDNAME“);
    }
    } ?>
    It worked fine for several years, but now I am working on a relaunch, moved the site and updated the database – and only the heading is shown.
    Can you give me any hint, what went wrong?

    Thanks,
    Meike

    #59599
    Franky
    Keymaster

    Just use [eme_events], with the “template_id_no_events” option, and with the 3 templates (for header, content, footer, and put in the header also your widgettitle).
    Also, the way you cann eme_are_events_available is completely wrong …
    Youre using
    eme_are_events_available($scope = “future”, $order = “ASC”, $location_id = “”, $category = 1)
    while you should be using
    eme_are_events_available("future", "ASC", "", 1)

    Please debug your eme_get_events_list too… I don’t think your format is correct at all (not encloded in quotes here).
    And use the “code” button to enclose your code please.

    #59622
    Anonymous
    Inactive

    Thanks for your answer. Sounds like buggy shit but as mentioned before it worked for several years. So maybe it wasn’t completly wrong. Actually I didn’t understand your first suggeation and when I tried the code I got an error-message…

    #59623
    Franky
    Keymaster

    A wrong usage of php function arguments for years is not buggy, it is just wrong 🙂
    Maybe it did work of course, I don’t know … I just gave the correct call here (it is what your call should be, but do post the error message).
    And this just came to mind: you’re using eme_get_events_list, but the way it returns events changed some months ago. See this post for the fix there:
    https://www.e-dynamics.be/wordpress/forums/topic/issue-with-widget-ul-headers/#post-59131 (simply put: put “print” in front of the call).

    #59665
    Anonymous
    Inactive

    Thanks, your hint solved a problenm on another site, where the events on the front-page also didn’t show up anymore.

    But actually all my efforts to reanimate events in the sidebar on the other site were unsuccsessful. Maybe there is a better solution than using this code in the page.php. You were talking about the “template_id_no_events” option and the three templates I could use. To be honest I don’t understand where to start with this. Can I put it in a widget?

    Thanks in advance!

    #59667
    Franky
    Keymaster

    See https://www.e-dynamics.be/wordpress/category/documentation/6-shortcodes/eme_events/
    So: instead of using the EME list widget, use a text widget with the [eme_events] shortcode (make sure shortcodes work in your widgets) and customize the options for template_id_no_events, template_id, template_id_header and template_id_footer (as explained in that page).
    In other words: start using [eme_events] until it returns the list the way you want it.

    #59697
    Anonymous
    Inactive

    Took some time, but now I got it. Thanks for your patience.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Generic’ is closed to new topics and replies.
Scroll to Top