Single event listing template override- suggestions on re-ordering

Home Forums Calendar Products Events Calendar PRO Single event listing template override- suggestions on re-ordering

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #527701
    vendaragroup
    Participant

    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!

    #527709
    vendaragroup
    Participant

    This reply is private.

    #527739
    vendaragroup
    Participant

    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?
    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!!

    #532405
    Barry
    Member

    Hi!

    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/9ozloOuyfP

    So 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?

    #532707
    vendaragroup
    Participant

    This reply is private.

    #533171
    Barry
    Member

    Hi!

    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?

    #533713
    vendaragroup
    Participant

    This reply is private.

    #540208
    Barry
    Member

    Right, 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.)

    #988011
    Leah
    Member

    Hello,

    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

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Single event listing template override- suggestions on re-ordering’ is closed to new replies.