Different layout for main events view compared to all other views

Home Forums Calendar Products Events Calendar PRO Different layout for main events view compared to all other views

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #936639
    orangetree
    Participant

    Hi, I am working on a client website that requires a specific layout for the events landing page, but then a different layout for all other pages.

    How would I display a custom landing page layout for the /events/ page, but not have this custom layout display on any of the other views? I tried creating a custom template in my WP theme and choosing this as my main events template, but this then obviously wraps all my events pages in the custom landing page layout.

    The main landing page has intro content then the events calendar/list block, then other widgetised content below, while all other views just need to use a standard template layout with a simple sidebar.

    Thanks in advance

    #936737
    Brian
    Member

    Hi,

    Thanks for using Pro!

    I can help you out here.

    We have a bunch of conditionals that can help you target just the different view pages:

    https://gist.github.com/jo-snips/2415009

    Does that list help out?

    Let me know if you have any follow up questions.

    Thanks

    #937357
    orangetree
    Participant

    Hi, those conditionals look quite straightforward, I’m just not sure I know which template I need to edit though. Which file controls the main events view?

    Thanks.

    #937628
    Brian
    Member

    If you have your Event Template set to the Default Event Template the file is here:

    the-events-calendar\views\default-template.php

    You can move and safely edit that file in your theme following the themer’s guide:

    https://theeventscalendar.com/knowledgebase/themers-guide/

    If you have the Default Page Template set in this setting instead:

    Events -> Settings -> Template -> Events Template

    You can edit your default page template in your theme. It depends on your theme for which file that is.

    #943675
    Brian
    Member

    I 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Different layout for main events view compared to all other views’ is closed to new replies.