Show TEC as child of another page in the url/permalink

Home Forums Calendar Products Events Calendar PRO Show TEC as child of another page in the url/permalink

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #891650
    Todd
    Participant

    Hi. I want my URLs to show TEC as a CHILD of another page, rather than the top-level of the site

    So instead of these urls –
    site.com/events/
    site.com/event/picnic/

    i want these –
    site.com/club/events/
    site.com/club/event/picnic/

    How can i do that?
    Thanks!

    #892044
    Brian
    Keymaster

    Hi,

    Unfortunately, there is not way to make the events pages a child of another page. You can change the slugs, but not add a parent to them. It maybe possible to do with some customization, but that is beyond the support we can provide in the forum.

    The only way I thought of that might make that work is to create a WordPress install using this as the site url:

    site.com/club/

    Then the Events Calendar would have the links you would like, but that would mean two different sites.

    Let me know if you have any other question.

    Thanks

    #892139
    Todd
    Participant

    I found a hook in the plugin — tribe_events_register_event_type_args — and used it to modify the rewrite slug from “events” to “club/events”.

    add_filter(‘tribe_events_register_event_type_args’,’tz_tec_urls’);
    function tz_tec_urls($foo) {
    $foo[‘has_archive’] = true;
    $foo[‘rewrite’][‘slug’] = ‘club/events’;
    return $foo;
    }

    This worked for the Events List, and a normal-single Event. These URLs show the right page – ‘site.com/club/events’ and ‘site.com/club/events/some-event-title/’.

    But it does NOT work for these, the page shows a 404 for these URLs:
    – Month View — ‘site.com/club/events/month/’
    – Recurring Events — ‘site.com/club/events/some-recurring-event/2014-11-22/’

    Why would the custom rewrite-slug — using the built-in hook — NOT work for these URLs / pages?

    #892956
    Brian
    Keymaster

    Some Views and the Recurring Events have different coding for them to work correctly.

    Recurring Event Permalinks are run through this file:

    \events-calendar-pro\lib\tribeeventspro-recurrencepermalinks.php

    Not sure how the Month View gets its permalink and unfortunately, there is not much more support I can provide on this customization, but I will try to answer anymore questions.

    Thanks

    #926757
    Brian
    Keymaster

    I am going to close this topic as we typically close threads if there is no activity after two weeks. Feel free to create a new thread and reference this one to save you time.

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Show TEC as child of another page in the url/permalink’ is closed to new replies.