Venue page template in full width, without sidebar

Home Forums Calendar Products Events Calendar PRO Venue page template in full width, without sidebar

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #46596
    Adrian
    Participant

    Hi,
    I have problems setting the single venue page template to display in full width, without the sidebar. Could you please point me to the right direction?

    #46630
    Jonah
    Participant

    Hi Adrian,

    What do you have selected for the Events Template in Events > Settings > Template?

    #46665
    Adrian
    Participant

    Hi Johan,
    I’ve selected the second option, Standard Page Template.

    #46669
    Jonah
    Participant

    Hi Adrian,

    Here’s what you’ll need to do then. This option uses your theme’s page.php template. Open that up and find where the get_sidebar() function is called. This loads your sidebar. Add the following conditional code to detect if you are on a venue page and not load the sidebar:

    if(!tribe_is_venue()) {
    get_sidebar();
    }

    Then, you might also need to make some CSS changes to get the layout to be full width…

    Does that help?

    #46822
    Adrian
    Participant

    Hi Jonah,
    I tried the code you suggested but all it did was that it got printed out on all the pages that were not tribe_venues.
    Do you have any other suggestion that I could try?

    #46830
    Jonah
    Participant

    Hi Adrian,

    Make sure you are using proper PHP opening/closing tags. Can you share your page.php through http://snippi.com/ please?

    #46853
    Adrian
    Participant

    Hi Jonah,
    The template I’m using for this site doesn’t have a page.php file, its functions are spread in other files. I figured that the proper one to insert the code you suggested would be the one I shared here: http://snippi.com/s/dtxtx7u
    I’ve replaced get_sidebar(); on line 20 with the code you suggested. Was it wrong to do so?

    #46931
    Adrian
    Participant

    Hi Jonah,
    Did you got my answer? Have you managed to see my code on Snippi?

    #46945
    Jonah
    Participant

    Hi Adrian,

    I’m not sure why the code is not working in that file. It likely has something to do with your theme. I would suggest trying the Default Events Template option instead and then you can use the /wp-content/plugins/the-events-calendar/views/ecp-page-template.php to customize your layout in the way I’ve suggested. To make changes to this file, first make a copy and place in an ‘events’ folder in your theme. You’ll likely need to make some other adjustments to include theme specific div’s or other markup to wrap the content the way you want.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Venue page template in full width, without sidebar’ is closed to new replies.