Different Default Views

Home Forums Calendar Products Event Aggregator Different Default Views

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #850877
    tallmeerkat
    Participant

    Hello, 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.

    #851104
    Josh
    Participant

    Hello 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!

    #854257
    tallmeerkat
    Participant

    Sorry but do you have a bit more of a worked up example? Thanks

    #858520
    Josh
    Participant

    Hello 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!

    #983580
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Different Default Views’ is closed to new replies.