Home › Forums › Calendar Products › Filter Bar › (All Events) Link!
- This topic has 8 replies, 2 voices, and was last updated 9 years, 9 months ago by Casey.
-
AuthorPosts
-
July 9, 2014 at 6:04 am #321214cclmParticipant
Hello there,
I wish to show two separate calendars in my site. Since, this is not directly doable, the other way to do it is to show two different categories to represent two different calendars.Calendar A – is actually category A, and I will the category URL to show Category A as if it is Calendar A.
The same applies to Calendar B.Now, my problem is that once someone views a single event, there is a link on the top that says ( << All events). If someone clicks it, it will take him to the whole calendar Not the category he come from.
Is there a way to customize this link, so it takes the user back to the category-based calendar, not the whole one?
I hope my question is clear. Thanks
July 10, 2014 at 7:52 am #335136CaseyParticipantcclm,
Good to hear from you again! 😀 Take a look at our themer’s guide, which will show you how to perform template overrides. The ‘All Events’ link is being displayed in ‘plugins/the-events-calendar/views/single-event.php’ on line 23, so you could perform a template override of this file and customize that link as you like.Hopefully that points you in the right direction. Thanks! 🙂
-Casey-
July 10, 2014 at 10:41 am #336356cclmParticipantCasey,
Thanks. I know this and did all customizations I need, but maybe my question is not clear. The ‘All Event’ link would show all events, not that specific (Category) events. I have two categories:
Category A
Category BIf a user clicks on Category-A, he will see category A events, now if they click on (All events), it will show All events and Not Category-A events. This is my problem. Is there a way to customize it to bring users back to Categories Listing as per their selection.
If a user clicks on Category-A, and wants to go back, he should be able to go back to Category-A events.
If a user clicks on Category-B, and wants to go back, he should be able to go back to Category-B events.
Hope this point is clear.
Thanks
mouazJuly 11, 2014 at 8:01 am #348442CaseyParticipantmouaz,
While I can’t provide the exact code for this customization, you should be able to use get_term_link() to get the correct URL for the Event’s Category. Something like this should do it:
<?php echo get_term_link( $your_category_id, 'tribe_events_cat' ); ?>
Hopefully that points you in the right direction. Thanks! 🙂
-Casey-
July 11, 2014 at 8:18 am #348608cclmParticipantThanks indeed.
July 11, 2014 at 8:28 am #348688cclmParticipantSorry to bother you again. I could not find the php page that shows (All course) link, in which I need to add that code!!!
July 11, 2014 at 12:21 pm #350027CaseyParticipantNo worries! Take a look at my response above:
The ‘All Events’ link is being displayed in ‘plugins/the-events-calendar/views/single-event.php’ on line 23, so you could perform a template override of this file and customize that link as you like.
Hope that helps!
July 11, 2014 at 1:57 pm #350639cclmParticipantThanks
July 11, 2014 at 2:51 pm #350821CaseyParticipantThanks for confirming that this got you sorted. Since it looks like you’re all set, I’m going to mark this thread “Answered” and close it out.
Feel free to start a new thread if you have further questions.
Thanks! 🙂
Cheers,
Casey -
AuthorPosts
- The topic ‘(All Events) Link!’ is closed to new replies.