Event List is not displaying shortcodes correctly

Home Forums Calendar Products Events Calendar PRO Event List is not displaying shortcodes correctly

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1405500
    April
    Participant

    I recently posted the same topic and had it closed as I thought the solution you guys offered was correct. It’s not.
    So Here it goes again:

    I’ve created a shortcode to call the Event Title since most of our Events have the same description and we just want to update Event meta dynamically.

    function shortcode_eventtitle() {
      return the_title_attribute('echo=0');
    }
    add_shortcode('eventtitle', 'shortcode_eventtitle');

    This echoes the shortcode only when viewing the list in calendar map mode. But when I call the [tribe_events view=”list” category=”barbecue”] for example, the shortcode is not displayed in excerpt.

    Any further help is appreciated.

    #1406671
    Barry
    Member

    Hi April!

    I’ll be happy to take a look at this — before I do, though, please note that while we always try to at least point you in the right direction if we can, we generally we do not provide in-depth support for custom code like you have written.

    One thing I notice – looking at the code you shared here – is this sort of pattern:

    function shortcode_eventvenue() {
      return tribe_get_venue( $postID );
    }

    However, $postID isn’t defined inside the function and is not passed in as a parameter, so it will never be set. Our helper functions such as tribe_get_venue() can work without that information (they assume you are referring to the current global post object), but it could be a source of warnings in your error log and confusion later on so I wanted to flag it 🙂

    This echoes the shortcode only when viewing the list in calendar map mode. But when I call the [tribe_events view=”list” category=”barbecue”] for example, the shortcode is not displayed in excerpt.

    I’m not sure I see the same thing, but I’m also not sure if I am replicating it correctly (it seems odd that you would place a shortcode for the event title in the event description… am I missing something and can you itemize the steps needed to replicate this issue)?

    Thanks!

    #1408528
    April
    Participant

    This reply is private.

    #1408973
    Barry
    Member

    This reply is private.

    #1422435
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Event List is not displaying shortcodes correctly’ is closed to new replies.