How having different view per kind of page

Home Forums Calendar Products Events Calendar PRO How having different view per kind of page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #122823
    latiuscia
    Participant

    Hi,

    I would like to have a default view per kind of page, I mean if page is category=photo view, if page is homepage=map view or if it is all events page=list. Where can I edit the code to do that? I think I’m going to getting and checking the kind of url to create an if, but where I can set the default view?

    Thanks a lot.
    Latiuscia

    #123080
    Barry
    Member

    Hi Latiuscia,

    You can set the template used to display event pages in the Events → Settings → Display admin screen.

    If you need more control than this – ie, you need separate templates for each primary view – you could for example override and customize the default events template (default-template.php) and add some code at the top to conditionally load in other alternative templates, depending on what you’re trying to achieve.

    Alternatively you might make use of WordPress’s template_include filter to pretty much achieve the same thing. Functions like tribe_is_list_view() and tribe_is_map() could be useful for detecting the actual type of event view being requested.

    Does that help?

    #130050
    Barry
    Member

    This thread’s not seen much activity for the last couple of weeks so I’ll go ahead and close it. Of course if you still need help with this or any other issue please don’t hesitate to create a new thread (or threads) and one of the team will be only too happy to help. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How having different view per kind of page’ is closed to new replies.