Support

Home Forums Event Espresso Premium Sidebars with Jupiter theme

Sidebars with Jupiter theme

Posted: November 20, 2015 at 7:11 am


T R

November 20, 2015 at 7:11 am

Hi there, been trying to get the sidebar to show something but no matter what I can’t get anything to show on the single event page.

I have tried to the custom sidebar plugins (using the custom post type ‘events’) to no avail. Have you heard about anyone with this theme who has had the sidebars work properly or do you know what could be wrong?

Any help is appreciated, thanks.


Lorenzo Orlando Caum

  • Support Staff

November 20, 2015 at 7:33 am

Hi, could you send a copy of the theme as a zip file to the email below?

support at eventespresso.com

Please do include a link to your support post.

Thanks


Lorenzo


T R

November 20, 2015 at 7:55 am

Sent, thank you.


Josh

  • Support Staff

November 25, 2015 at 3:10 pm

Hi Tyler,

I spent a good chunk of the afternoon digging through the Jupiter theme’s code. There’s a few things that need fixing to make it do what you want it to do. I’ll follow up with your questions from the email with and include what I found in my answers below:

Thanks for trying to help with this. There’s no specific documentation for
adding custom post types to the theme, other than adding them with another
plugin (ex. WP-Types plugin), which I do have access to if need be. Would
that be a way to go (using a plugin to create custom post type)?

No. This is because Event Espresso already registers its custom post types. The solution is not to create additional post types.

Otherwise, I’m fine with using the single event as is, as long as I can get
the featured image working. Then I can set the theme default to full width
and go without sidebars for now. Would just be great if there was something
I could do or modify to get sidebars working as well.

Your other option for getting the sidebars working is do some real digging into the theme. I’m afraid they just didn’t code this theme to allow the sidebars to just work with custom post types.

Two more things while I mention this sidebar issue as well
– The feature image for the event does not display on the single event page for some reason

I looked into this, and the reason this happens is because of some code in the theme’s single.php file. If you open up single.php in a code editor and look at line 75, you’ll see this:

if($post_type == 'image') { ?>

the code basically says, if this isn’t an image post as declared by the theme, don’t display an image here.

You can change the code to include Event Espresso events by changing that line to be:

if($post_type == 'image' || 'espresso_events' == get_post_type() ) { ?>

That’s not all, there’s a few mistakes in the code on line 78 where it has this:

<img alt="<?php the_title(); ?>" title="<?php the_title(); ?>"

the_title() should never be used for attributes. Instead, the_title_attribute() should be used here. So you can change it to be:

<img alt="<?php the_title_attribute(); ?>" title="<?php the_title_attribute(); ?>"

– On the events archive page “http://mysite.com/anza/events” you can see the feature image does not display properly as well (it’s just the code), how can this be fixed?

I can’t see your site, but I can show you how to fix. Again, this is caused by some mistakes in the theme code. The simple way to fix is go in to Event Espresso > Events > Templates and set Display Status Banner for Event List Pages to No.

Or you can go in to edit the blog style template that you’re using (the default is blog-styles/modern.php) and change where it has
get_the_title()

to be

strip_tags( esc_attr( get_the_title() ) )

Those are on lines 74 and 76 of that template.

If you go ahead and make the edits to your theme, I highly recommend copying over your edited templates over to a child theme, and activate the child theme, so you don’t lose your edits if and when a theme update becomes available.


T R

November 25, 2015 at 7:51 pm

That’s fantastic Josh, thank you so much for looking into it even more and giving those suggestions. I tried out both suggestions for the feature image (using child theme) and it worked perfectly.

I may delve into seeing if I can sidebars at a later time, but for now will go without them. Apparently there is an overhaul coming for Jupiter (v5.0) this month so hopefully there are a some changes that will allow sidebars to be integrated easier.

Great support, thanks again!


Josh

  • Support Staff

November 26, 2015 at 8:21 am

You’re welcome.

The support post ‘Sidebars with Jupiter theme’ 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