Support

Home Forums Event Espresso Premium Add sidebar to Single Events

Add sidebar to Single Events

Posted: April 29, 2020 at 6:11 pm

Viewing 3 reply threads


Jarred

April 29, 2020 at 6:11 pm

Hey guys, can I pleae have some PHP code to add a sidebar to the “Single Events” and “Events” on Event espresso.

With Divi theme you can’t use their divi builder so I have no way to add a sidebar to events. I thought the builder might at least work for the template but not workin for me.

So basically, /events/ and events/my-event-today (single event)

I want to be able to add sidebars so I can place widgets in it. Thanks


Josh

  • Support Staff

April 30, 2020 at 10:55 am

Hi Jarred,

It looks like someone added some custom CSS to hide the sidebar on your site. For example, in your site’s wp-content/themes/ArtsyRose/style.css on lines 101 and 102 there’s this:

#sidebar {
 display:none
}

So you do not need PHP code to add a sidebar, the PHP code from your theme is already adding the sidebar, the problem is there’s CSS that was added to hide it.

One approach you could take would be to remove the CSS that’s hiding the sidebar and making the left column 100% wide.

Or another approach would be to add on to the CSS you have and restore the sidebar if it’s an Event Espresso post type. e.g.

.single-espresso_events #left-area,
.post-type-archive-espresso_events #left-area {
width: 79%;
float: left !important;
}

.single-espresso_events #sidebar,
.post-type-archive-espresso_events #sidebar {
display: block;
}


Jarred

April 30, 2020 at 4:46 pm

Thanks Josh that worked.

Although it also added it to my checkout pages and stuff so I have to find another way.

I did learn something very cool. On the new Divi Theme Builder (its an option on the theme itself comes with divi built in) you can create custom templates AND it recogizes the “Events” custom post type. That means that EE CAN be designed with the Divi Theme Builder I think. I still have to test it, but I thought that would help if anyone else asks.

Lastly,
How can I remove COUNTRY from the Credit Card form. It is the worst thing in my mind. We are nothing but USA customers and it just adds more trouble on form. Yes I removed it from the EE stuff, however its still displayed if someone chooses credit card.


Tony

  • Support Staff

May 1, 2020 at 4:39 am

Although it also added it to my checkout pages and stuff so I have to find another way.

If you took this approach:

One approach you could take would be to remove the CSS that’s hiding the sidebar and making the left column 100% wide.

Then the side will display everywhere you theme adds it, which includes the above.

If you use the second approach (meaning you leave the CSS to hide the sidebar on the site):

Or another approach would be to add on to the CSS you have and restore the sidebar if it’s an Event Espresso post type. e.g.

Then use the code Josh gave you it will only display the sidebar on the single EE event page or event list, not everywhere.

It sounds like you may have done both?

I did learn something very cool. On the new Divi Theme Builder (its an option on the theme itself comes with divi built in) you can create custom templates AND it recogizes the “Events” custom post type. That means that EE CAN be designed with the Divi Theme Builder I think. I still have to test it, but I thought that would help if anyone else asks.

Whilst you will be able to style some parts, you likely will not be able to style all of the individual event elements EE adds. Event Espresso is currently not compatible with any page builders to allow for that level of customization.

How can I remove COUNTRY from the Credit Card form. It is the worst thing in my mind. We are nothing but USA customers and it just adds more trouble on form. Yes I removed it from the EE stuff, however its still displayed if someone chooses credit card.

Which payment method? Some require the country field is set.

Viewing 3 reply threads

The support post ‘Add sidebar to Single Events’ 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