Posted: 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? |
|
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 |
|
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? |
|
friendly bump… |
|
Would you mind if we took a look? Please send WordPress admin level log in credentials via this form: |
|
Thanks, Seth. The details have been sent. |
|
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? |
|
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? |
|
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. |
|
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. |
|
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. |
|
Hey Tony, Can your email box receive a 20 MB file? |
|
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. |
|
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:
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. |
|
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.