Support

Home Forums Event Espresso Premium Single event needs to be full width page

Single event needs to be full width page

Posted: January 4, 2016 at 1:54 pm


emilyjourney

January 4, 2016 at 1:54 pm

I’ve searched the forums and read many “solutions” to this problem.
Nothing works for me.
I’m using the most current version of EE4.
Where to I remove the sidebar for the single event?
I need a specific path to follow within the plugin files through which I can remove the side bar.
Thank you.


Josh

  • Support Staff

January 4, 2016 at 2:41 pm

Hi Emily,

It turns out that Event Espresso does not add the side bar. The path to the file that adds the sidebar is within the active WordPress theme.


emilyjourney

January 4, 2016 at 2:57 pm

Gotcha. Thanks for the clarification.
Will you help me make the necessary edit?
Emilyjourney.com/seminars
As well is the individual event.


Josh

  • Support Staff

January 4, 2016 at 3:09 pm

It looks like you have a child theme set up, so what you do is copy over the parent theme’s templates to the child theme, then remove the code that displays the sidebar, then you may need to tweak some of the CSS.

I’m not sure which exact files that you’ll edit since I don’t have a copy of the theme to know for sure. However, the usual theme template names that will control the display of events are archive.php and single.php.


emilyjourney

January 4, 2016 at 5:11 pm

Hmm, I actually don’t want my sidebar to disappear on the rest of my posts.
I removed this line: <?php get_sidebar(); ?> from the archive.php file and the single.php file.
The result was global and it did not extent the width of the body container the same way that a full-width page does.
At this point, I’m thinking this plugin may not be the right choice for me.
I do appreciate your help.


Tony

  • Support Staff

January 5, 2016 at 2:53 am

Hi Emily,

Editing the archive.php and single.php files will be global for all post types, however you can wrap the get_sidebar() call within a check for EE events so that it is only removed for those post, like this:

if ( get_post_type() != 'espresso_events' ) {
	get_sidebar();
}

Which basically means ‘If this is not an EE event post, display the sidebar’.

The content not being displayed full width is because although the sidebar has been removed, your theme will need a class adding to the container to tell it to use the full width of the page, on your theme that seems to be ‘full-width’ but without seeing the code its hard to say where to add a fix.

You can use something like:

if ( get_post_type() == 'espresso_events' ) { echo ' full-width'; }

To add the full width class within the container div/section when viewing EE events. The container on your theme looks like it will have an id of ‘primary’.

The support post ‘Single event needs to be full width page’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso