Home › Forums › Calendar Products › Events Calendar PRO › Shortcode or way to add "tribe-events-meta-group-other" to a page
- This topic has 0 replies, 2 voices, and was last updated 6 years ago by hannujaatinen.
-
AuthorPosts
-
March 21, 2018 at 7:07 am #1484783hannujaatinenParticipant
I’m creating a new single event template and I’d like to know how I can add the tribe-events-meta-group tribe-events-meta-group-other section in it?
March 22, 2018 at 9:08 pm #1486654CliffMemberHi, Hannu.
That comes from including /wp-content/plugins/events-calendar-pro/src/views/pro/modules/meta/additional-fields.php
add_action( 'tribe_events_single_event_meta_primary_section_end', array( $this, 'additional_fields' ) );
from /wp-content/plugins/events-calendar-pro/src/Tribe/Single_Event_Meta.php is how this gets included (see addiitonal_fields() method within this file)Please let me know how this goes for you.
March 23, 2018 at 3:06 am #1486751hannujaatinenParticipantIf I want to create a shortcode what should I include in that?
I’ve tried using
// Add Shortcode
function tapahtuman_metatiedot() {tribe_get_template_part( ‘pro/modules/meta/additional-fields’, null, array(
‘fields’ => tribe_get_custom_fields(),
) );}
add_shortcode( ‘tapahtuman-metatiedot’, ‘tapahtuman_metatiedot’ );It actually worked when I saved the shortcode in Beaver Themer but then the meta details jumped to top left corner of the page 🙁
March 23, 2018 at 3:07 am #1486752hannujaatinenParticipantIs it doing the action too early or am I missing something?
March 23, 2018 at 10:15 am #1487193CliffMemberShortcodes need to return, not echo, which is what tribe_get_template_part() does: https://github.com/moderntribe/the-events-calendar/blob/4.6.12/src/functions/template-tags/general.php#L154
April 14, 2018 at 9:35 am #1507386Support DroidKeymasterHey 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 ‘Shortcode or way to add "tribe-events-meta-group-other" to a page’ is closed to new replies.