Home › Forums › Calendar Products › Events Calendar PRO › Show TEC as child of another page in the url/permalink
- This topic has 4 replies, 2 voices, and was last updated 9 years, 3 months ago by Brian.
-
AuthorPosts
-
November 19, 2014 at 11:32 pm #891650ToddParticipant
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!November 20, 2014 at 6:54 am #892044BrianKeymasterHi,
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
November 20, 2014 at 7:52 am #892139ToddParticipantI 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?
November 20, 2014 at 5:52 pm #892956BrianKeymasterSome 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
December 30, 2014 at 7:25 am #926757BrianKeymasterI 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
-
AuthorPosts
- The topic ‘Show TEC as child of another page in the url/permalink’ is closed to new replies.