Events Made Easy Forums Bug fixed or feature request implemented Using shortcode in Event Details = not working

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

    I’m putting a shortcode in the event details to pull a post with relevant information. That works beautifully.

    But, then I tried to add the <!–more–> tag so that I could just see an excerpt in the event list, instead of the whole long post.

    It wasn’t working, so I did a little debugging. In events_manager.php, it gets to line 930, so it is seeing the #_EXCERPT placeholder., but when it searches for <!–more–>, it’s just searching the shortcode itself instead of the actual content of the post.

    I believe with a regular post, I’d apply a filter to the_content to get it to interpret the shortcode first.

    But I’m not that familiar with filters and eme is not actually getting the_content, so I’m not quite sure where to go with this. I see in eme_events.php, line 1210 is where $events gets all cleaned up, so I thought I’d try to do something there, but I’m not exactly sure what to do to get it to interpret shortcodes in the notes/details field.

    #46548
    Franky
    Keymaster

    The <!--more--> can only be in the event notes, nowhere else. And the event notes is a text field where you should type in normal info.

    #46549
    Anonymous
    Inactive

    Well, the <!–more–> is in the post, and the shortcode to get the post is in event notes. And the shortcode works – it pulls the post in. EME just doesn’t filter the shortcodes before looking for <!–more–>

    For now, I just put a link to the post. Hopefully, they’ll click the link in the notes instead of the Event link – which would take them to the single event page and THEN they’d have to click the link to get to the information.

    I just thought that since shortcodes in notes worked and <!–more–> in notes worked, that for consistency’s sake – and a nice feature – they should work together.

    Hmmm, maybe I’ll make a new shortcode that just pulls the excerpt into the notes – that might work.

    #46550
    Franky
    Keymaster

    O, I see what you mean: the more-tag of a regular post and some kind of shortcode to get the content of a post in a page … sjeez, never done that before. Why don’t you use the event notes to give the information? Anyway, you can leave out the event link in your formatting …

    #46551
    Anonymous
    Inactive

    Sorry I didn’t explain fully. BTW – finding where I’d need to add the code if I was going to modify the plugin, was really easy – very nice coding work – and great product.

    Here’s the deal and why I’m trying to do it the way I’m doing it. It’s a little dinner theater with acting students giving the performance. They post a notice, like: Bios and Headshots due on Jan 30th. But there are about 2 pages of information and examples about how to create bios and the formats needed for headshots – so a lot of info to put in for an event and we will probably use the same info for the next theater production. So when I put the deadline on the calendar, it would be nice if people could see the info, without me having to copy and paste and then worry about updating it in two places.

    Like I said, the shortcode to do this works great. But 2 pages of info in the middle of the events list is a bit confusing – and I need to keep the event links for the other events – rehearsals and performances.

    Thanks for your responses. I appreciate it.

    #46552
    Franky
    Keymaster

    In your case, probably changing line 935 in events-manager.php

    $replacement = $event[$field];

    to

    $replacement = do_shortcode($event[$field]);

    should do it, no? I don’t see the harm of adding this for everybody …

    #46553
    Anonymous
    Inactive

    Thanks, I’ll try that and see how that works out.

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