Posted: 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
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:
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.
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.
If you took this approach:
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):
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?
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.
Which payment method? Some require the country field is set.