Home › Forums › Calendar Products › Events Calendar PRO › Additional fields in the events list widget
- This topic has 5 replies, 2 voices, and was last updated 10 years, 7 months ago by
Geoff.
-
AuthorPosts
-
August 25, 2015 at 2:46 am #998687
Sören
ParticipantHi there,
i copied the single-event.php file into my theme folder:
/wp-content/themes/yoo_helios_wp/tribe-eventsI added:
$additional_fields = tribe_get_custom_fields();under:
$events_label_plural = tribe_get_event_label_plural();and add:
<?php echo $additional_fields['ticket'];?>over:
</div> <!-- Event header -->But the additional field “ticket” is not shown.
I want to display the field ticket in the widget and on the page behind “show more”, seems to be an event list.
Thanks for your help.
August 25, 2015 at 8:13 am #998816Geoff
MemberHey Sören and welcome to the forums! I hope you’re enjoying the plugins and am stoked to have you aboard. 🙂
Are you trying to show the additional fields on the single event post or the events list widget?
If you’re trying to show the fields in the widget, then that is actually a different single-event.php template (I know, a little confusing, right?) that is located in /plugins/events-pro/views/widgets/modules/single-event.php.
To override that template you will do the same thing you already doing–adding it to your theme files–but here instead: [your-theme]/tribe-events/pro/widgets/modules.
Give that a try instead and see if it does the trick. 🙂
Cheers!
GeoffAugust 25, 2015 at 12:01 pm #998887Sören
ParticipantHey Geoff – great! thanks! works!
One last question i hope, if i click on show more in the widget the following page is the a list view of all events. Witch file should i copy in which folder to make the override? I want the additional field in the list view page too.
August 25, 2015 at 2:07 pm #998938Geoff
MemberAwesome, I’m glad that helped! Nice work putting it together. 🙂
You can do the same for the list/single-event.php file, which is located at /plugins/the-events-calendar/views/list/single-event.php.
Drop a copy of that into this folder:
[your-theme]/tribe-events/list…and you should be able to display those fields wherever you would like them to show up.
Let me know if that works out!
Geoff
August 26, 2015 at 1:38 pm #999322Sören
ParticipantIt works out! Thank you very much.
August 26, 2015 at 2:00 pm #999332Geoff
MemberRight on! Thanks for following up and letting me know–stoked to hear that everything is working out. Feel free to hit us up with a new thread if any other questions pop up and we’d be happy to help. 🙂
Cheers!
Geoff -
AuthorPosts
- The topic ‘Additional fields in the events list widget’ is closed to new replies.
