Additional fields in the events list widget

Home Forums Calendar Products Events Calendar PRO Additional fields in the events list widget

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #998687
    Sören
    Participant

    Hi there,

    i copied the single-event.php file into my theme folder: /wp-content/themes/yoo_helios_wp/tribe-events

    I 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.

    #998816
    Geoff
    Member

    Hey 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!
    Geoff

    #998887
    Sören
    Participant

    Hey 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.

    #998938
    Geoff
    Member

    Awesome, 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

    #999322
    Sören
    Participant

    It works out! Thank you very much.

    #999332
    Geoff
    Member

    Right 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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Additional fields in the events list widget’ is closed to new replies.