Home › Forums › Calendar Products › Events Calendar PRO › Single event listing template override- suggestions on re-ordering
- This topic has 8 replies, 3 voices, and was last updated 8 years, 10 months ago by Leah.
-
AuthorPosts
-
July 28, 2014 at 1:32 pm #527701vendaragroupParticipant
We would like the “other” elements to display between the Details and Venue (we’ve changed the name to Location).
I am using template overrides in /wp-content/themes/Divi/tribe-events
I have the /single-event.php and /modules/meta …venue.php and details.php files.
I am not understanding how to edit the template override to account for the additional fields in the other-group. Suggestions? I will paste the code for the override file in a private reply in the next comment. Thanks!July 28, 2014 at 1:33 pm #527709vendaragroupParticipantThis reply is private.
July 28, 2014 at 1:39 pm #527739vendaragroupParticipantThis file: /plugins/events-calendar-pro/views/pro/modules/meta/additional-fields.php
says: “Override this template in your own theme by creating a file at:
* [your-theme]/tribe-events/modules/meta/details.php ”
I’m wondering if this is supposed to say “* [your-theme]/tribe-events/modules/meta/additional-fields.php” instead?
But I still am not sure about where this fits in to the Single event view.
Here is screenshot of what I am hoping for: http://www.screencast.com/t/9ozloOuyfP
Thanks!!July 29, 2014 at 6:15 am #532405BarryMemberHi!
This file: /plugins/events-calendar-pro/views/pro/modules/meta/additional-fields.php
says: “Override this template in your own theme by creating a file at:
* [your-theme]/tribe-events/modules/meta/details.php ”
I’m wondering if this is supposed to say “* [your-theme]/tribe-events/modules/meta/additional-fields.php” instead?You’re absolutely right, the docblock is incorrect. The path you should use for your override in this case is:
your-theme/tribe-events/pro/modules/meta/additional-fields.php
I’ll get that logged as something we need to address – thanks for highlighting it!
But I still am not sure about where this fits in to the Single event view.
Here is screenshot of what I am hoping for: http://www.screencast.com/t/9ozloOuyfPSo in this reply from another thread you can see an example of repositioning the additional fields section of the meta data. In your case you could do the same – but of course you don’t actually want to position it at the very top of the section, so you might remove the line of code reading:
add_action( 'tribe_events_single_event_meta_primary_section_start', $callback );
Test this bit out first – if it works, it will simply remove the additional fields from display.
Next you will want to add them back in, so to do that set up a custom override for modules/meta.php and locate this line of code:
tribe_get_template_part( 'modules/meta/details' );
Then, insert a new line just after that as follows:
TribeEventsPro::instance()->single_event_meta->additional_fields();
Does that work for you here?
July 29, 2014 at 7:36 am #532707vendaragroupParticipantThis reply is private.
July 29, 2014 at 9:23 am #533171BarryMemberHi!
Unless you’re sharing something confidential like user logins it is generally best to avoid using private replies – it means others with similar questions in the future won’t be able to see the discussion in its entirety. Also, the forum is – as you can probably tell – not the very best place to share code so, particularly for longer snippets, sharing them via Pastebin, Gist or some similar service is often better 🙂
Almost. So the additional fields show up in the single event view, but not in the full event list.
Right – by default they don’t show up there – but you could try adding that same line of code before into your custom list/single-event.php template:
TribeEventsPro::instance()->single_event_meta->additional_fields();
Does that help?
July 29, 2014 at 11:23 am #533713vendaragroupParticipantThis reply is private.
July 30, 2014 at 9:08 am #540208BarryMemberRight, sorry for the confusion. As that is a piece of PHP it would need to be wrapped in PHP tags:
<?php TribeEventsPro::instance()->single_event_meta->additional_fields(); ?>
(Unless of course it is positioned within a set of existing tags.)
July 20, 2015 at 12:22 pm #988011LeahMemberHello,
Thank you again for bringing this issue to our attention. We’re happy to say that we have added a fix for this into our upcoming version 3.11 release. Keep an eye on your Updates page for the new version. If you have any trouble with the update (or are still seeing this problem after you update) please start a new thread and we’d be happy to help out.
Thank you for your patience while we got this release ready to go!
Best,
Leah
and the rest of The Events Calendar team -
AuthorPosts
- The topic ‘Single event listing template override- suggestions on re-ordering’ is closed to new replies.