Home › Forums › Calendar Products › Events Calendar PRO › Event List is not displaying shortcodes correctly
- This topic has 5 replies, 2 voices, and was last updated 8 years, 3 months ago by
April.
-
AuthorPosts
-
December 14, 2017 at 6:56 am #1405500
April
ParticipantI 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.
December 15, 2017 at 11:53 am #1406671Barry
MemberHi 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!
December 19, 2017 at 1:18 am #1408528April
ParticipantThis reply is private.
December 19, 2017 at 10:35 am #1408973Barry
MemberThis reply is private.
January 10, 2018 at 8:37 am #1422435Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Event List is not displaying shortcodes correctly’ is closed to new replies.
