Related events, Duplicate Venues, & Before HTML

Home Forums Calendar Products Events Calendar PRO Related events, Duplicate Venues, & Before HTML

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #52933
    esteban
    Participant

    I just upgraded to 3.0 and would like to solve the following:

    1. How do modify the views to get rid of related events. It shows the same 3 events in all my events.

    2. I would like to show the Before HTML only in the event’s list page and not in every single event. But can’t find the code to erase.

    3. The button to remove duplicated venues suddenly dissapeared.

    #52980
    Jonah
    Participant

    Hi esteban,

    1. You should be able to use this in your theme’s functions.php file:

    /*-----------------------------------------------------------------------------------*/
    /* Remove Tribe Related Events
    /*-----------------------------------------------------------------------------------*/
    remove_action( 'tribe_events_single_event_after_the_meta', 'tribe_single_related_events' );

    2. You should be able to do this by making a copy of /wp-content/plugins/the-events-calendar/views/default-template.php and placing in a ‘tribe-events’ folder in your theme and then wrapping the tribe_events_before_html() and tribe_events_after_html() tags in a conditional check for whether or not you are viewing the list like so:

    if(tribe_is_upcoming()) { tribe_events_after_html(); }

    Does that make sense?

    3. You can find this in Events > Settings > General down towards the bottom: http://cl.ly/image/402g1N0W0E1A

    I hope that all helps but let me know if you have any other questions.

    – Jonah

    #52997
    esteban
    Participant

    The related events is solved. Thanks.-

    But lets say I want to use this with one of my themes templates and not the Plugins default template. Is this posible ?

    if(tribe_is_upcoming()) { tribe_events_after_html(); }

    I saw the duplicate venues button and it suddenly disapeared http://www.proyectomx.com/image.png

    #53023
    esteban
    Participant

    I solved it with this tribe-templates.class.php

    /**
    * Loads the contents into the page template
    *
    * @return string Page content
    */
    public static function load_ecp_into_page_template() {
    // only run once!!!
    remove_filter(‘the_content’, array(__CLASS__, ‘load_ecp_into_page_template’) );

    self::restoreQuery();

    ob_start();

    if(tribe_is_upcoming()) { echo tribe_events_before_html(); }

    tribe_get_view();

    #53025
    esteban
    Participant

    I still can’t make the duplicate venues to come back

    #53030
    Jonah
    Participant

    Hi Esteban,

    Glad you figured it out, but I would suggest not modifying core files like you did with tribe-templates.class.php…

    The duplicate venues button will only show until you’ve actually run the merge script or there are actually duplicate venues. Are you still seeing duplicates? Are new duplicate venues being created when you create new events?

    – Jonah

    #979536
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Related events, Duplicate Venues, & Before HTML’ is closed to new replies.