Home › Forums › Calendar Products › Event Aggregator › Different Default Views
- This topic has 4 replies, 3 voices, and was last updated 11 years ago by
Support Droid.
-
AuthorPosts
-
October 30, 2014 at 5:30 pm #850877
tallmeerkat
ParticipantHello, Is it possible to have a different default view for a particular category? So, set the main events page as “List”; category1 as “Month” and categoryb as “day”? Thanks.
October 30, 2014 at 8:03 pm #851104Josh
ParticipantHello tallmeerkat,
Thanks for reaching out to us!
That is actually a great question. We’re currently working on updating a tutorial that will allow you to set categories to be in list view automatically. However, this won’t be the exact solution that your describing from a term by term basis.
One option you could pursue would be to use is_tax() conditionals to check for specific archives of the “tribe_events_cat” taxonomy and then add redirects to the specific URLs for the view you would like for that term. So for example, category1 would redirect to “http://yourdomain.com/events/category/category1/list” to display list view and “http://yourdomain.com/events/category/category2/today” to display category 2 in day view. This code would be added to your theme’s functions.php file.
I’m sorry I wasn’t able to give you a direct response however I hope this was able to point you in the right direction.
Thanks!
November 1, 2014 at 7:38 am #854257tallmeerkat
ParticipantSorry but do you have a bit more of a worked up example? Thanks
November 3, 2014 at 1:47 pm #858520Josh
ParticipantHello tallmeerkat,
It’s difficult to give a full example of what you’re looking for and something that isn’t fully supported within our forums, however as an elaboration of the the previous comment the possible solution would look something like:
if(is_tax('tribe_events_cat', 'your-cat-slug' ) ) { wp_safe_redirect( 'http://yourdomain.com/events/category/your-cat-slug/list' ); //redirects set term to list view }This would be added to your theme’s functions.php file.
Thanks!
July 7, 2015 at 6:31 am #983580Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Different Default Views’ is closed to new replies.
