Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #54855
    Anonymous
    Inactive

    Hello, I like your plugin. It’s so easy to make a event 😉

    I would like to put informations (location, event date, booking form) of a single event page in a widget like text widget but only shortcodes works not the placeholder.

    How can I do that ???

    Thanks again for your fabulous plugin

    #54857
    Anonymous
    Inactive

    Examples:
    [eme_event id=23]
    [eme_event id=37 template_id=5]

    Put the placeholders in your template.

    #54864
    Franky
    Keymaster

    The shortcode is interpreted before the placeholders so that’s why it isn’t working.

    #54865
    Anonymous
    Inactive

    Ok I understand so I can put a blank template and insert the placeholders behind the shortcode.
    That’s right ?

    #54866
    Anonymous
    Inactive

    But when I put the shortcode [eme_event] in the widget I don’t know what is the id of the courant simple event page so I put some php to get this ID.

    I don’t like this solution. Can you tell me more ?

    #54871
    Franky
    Keymaster

    The widget is not related in any way to the event currently being viewed, so it has no knowledge of the event id to be used.
    Mayne I could add that (it is not that difficult …), this is the relevant part of the code to be used to detect:

       if (eme_is_single_event_page())
          $event_id = intval(get_query_var('event_id'));
    

    So, adding a placeholder like #_CURR_EVENT_ID (or something else, I’m open for suggestions), that could return the event id of the event currently shown.

    #54875
    Anonymous
    Inactive

    Yes #_CURR_EVENT_ID it’s a good placeholder. I don’t like put some PHP in my widget.

    #54877
    Franky
    Keymaster

    #_SINGLE_EVENTPAGE_EVENTID will be the new placeholder, see
    http://plugins.trac.wordpress.org/changeset/1249888

    #54878
    Anonymous
    Inactive

    Yeah!!! Good job

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top