Support

Home Forums Event Espresso Premium Espresso Widgets not displaying on only one page of my site

Espresso Widgets not displaying on only one page of my site

Posted: August 24, 2016 at 10:37 am

Viewing 13 reply threads


Jeffrey

August 24, 2016 at 10:37 am

Hey guys,

My website is https://sfcbsa.org/. The homepage is a WordPress blog page (meaning the homepage is set to show the latest posts) and it uses a bunch of widget areas. You’ll see on the homepage the Quick Links, which are widgets and then next to that is a blank space under the “See all events” links where I have two Upcoming Event widgets. Below them in the grey area is another single event Upcoming Event widget that isn’t showing. The widget in the gray area shows on all the other pages of the site. I’m using an Upcoming Event widget in my blog sidebar successfully.

It is only recently that the widgets don’t show on the homepage. I tried rolling back to an older version of Event Espresso with no luck.

Any ideas of what could be going on? What should I take a look at?


Tony

  • Support Staff

August 25, 2016 at 1:10 am

Hi there,

Can you go to Dashboard -> Appearance -> Widgets.

Find the EE Upcoming Events widget and open the settings, there you will find the option ‘Show on all pages’, is that set to No?

It’s the 3rd option from the bottom here – http://take.ms/7hbx4


Jeffrey

August 25, 2016 at 8:34 am

Thanks, Tony, for your reply. All three is the missing widgets are set to show on all pages. It’s not a widget setting issue. The Upcoming Event widget that I have added right above the footer of the website shows on every page BUT the homepage.

When I inspect the code on the homepage, there are no errors and there is not any trace at all of the widgets.

This is for a client site, so I need to get this worked out. Any other thoughts or ideas that I can try?


Jeffrey

August 26, 2016 at 2:26 pm

friendly bump…


Seth Shoultes

  • Support Staff

August 27, 2016 at 11:18 am

Would you mind if we took a look? Please send WordPress admin level log in credentials via this form:
https://eventespresso.com/send-login-details/


Jeffrey

August 29, 2016 at 7:25 am

Thanks, Seth. The details have been sent.


Seth Shoultes

  • Support Staff

August 29, 2016 at 11:50 am

Thanks. I took a brief look around in the admin and don’t see anything strange.

Can you can try turning on WP Debug in your wp-config.php file to see if there any errors preventing these widgets from working?


Tony

  • Support Staff

August 30, 2016 at 5:37 am

As far as I can tell there is no loop within your themes index.php template file (used for the homepage when you set it to display your posts), so I think this is happening because on your posts page there is no $post object at all.

The widget checks for a global $post object before outputting any details.

To test this you need to use a modified version of the EE Widget, try this one – https://gist.github.com/Pebblo/c09495261f97c337b1c063d98785b960

That’s setup as a plugin and can be downloaded and installed to your site through Dashboard -> Plugins -> Add new -> Upload plugin.

Activate the plugin and it will add a ‘Custom Event Espresso Upcoming Events’ widget to your site, add that to a widget area that shows on the home page, does it display the events?


Jeffrey

August 30, 2016 at 7:52 am

Wow! Very interesting. That’s good to remember in the future. The theme my client is using only uses Widget areas on the index.php file for the homepage. You’re modified widget works.

Gold star for you, and good looking out. I appreciate your efforts.


Tony

  • Support Staff

August 31, 2016 at 5:13 am

I’ve created a ticket to see if we can add some ‘theme proofing’ to that check as its more of an odd theme setup really.

Anyway, I’m glad the custom widget worked for you, any further problems just let us know.


Tony

  • Support Staff

September 2, 2016 at 2:49 am

Hi jradmin,

Would you mind sending us a copy of the theme?

One of the developers pointed out that if there is no $post available, then other sections of code running within the widget should also fail. So it seems $post is not a WP_Post object, but obviously its set to something else and I’d like to find out what that is.

It’s the parent theme we would need and if you could send a copy to support[at]eventespresso.com I’ll take a look.


Jeffrey

September 2, 2016 at 7:27 am

Hey Tony,

Can your email box receive a 20 MB file?


Tony

  • Support Staff

September 2, 2016 at 8:28 am

It should yes.

However it may be easier (in case it doesn’t work) to host the file somewhere and add a link within the email we can use to download it.


Tony

  • Support Staff

September 7, 2016 at 4:16 pm

Thank you for sending over the theme, I installed it locally and setup the homepage to display the Upcoming Events widget without any problems.

Its possibly a theme setting conflicting but it seems very odd.

One final test you could do on your site is add something like:

var_dump($post);

Just after line 275 of the custom widget: https://gist.github.com/Pebblo/c09495261f97c337b1c063d98785b960#file-tw_custom_upcoming_events_widget-php-L275

Then refresh the home page (note your users will see this output) and capture the output of what $post is, then paste that here.

Viewing 13 reply threads

The support post ‘Espresso Widgets not displaying on only one page of my site’ 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