Home › Forums › Calendar Products › Events Calendar PRO › Venue page template in full width, without sidebar
- This topic has 8 replies, 2 voices, and was last updated 13 years ago by
Jonah.
-
AuthorPosts
-
April 23, 2013 at 5:03 am #46596
Adrian
ParticipantHi,
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?April 23, 2013 at 7:57 am #46630Jonah
ParticipantHi Adrian,
What do you have selected for the Events Template in Events > Settings > Template?
April 23, 2013 at 11:25 am #46665Adrian
ParticipantHi Johan,
I’ve selected the second option, Standard Page Template.April 23, 2013 at 12:01 pm #46669Jonah
ParticipantHi 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?
April 25, 2013 at 8:03 am #46822Adrian
ParticipantHi 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?April 25, 2013 at 9:35 am #46830Jonah
ParticipantHi Adrian,
Make sure you are using proper PHP opening/closing tags. Can you share your page.php through http://snippi.com/ please?
April 25, 2013 at 11:09 am #46853Adrian
ParticipantHi 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?April 26, 2013 at 8:59 am #46931Adrian
ParticipantHi Jonah,
Did you got my answer? Have you managed to see my code on Snippi?April 26, 2013 at 10:32 am #46945Jonah
ParticipantHi 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.
-
AuthorPosts
- The topic ‘Venue page template in full width, without sidebar’ is closed to new replies.
