Next Event in Header – Not working on single event pages
-
Hi, I’m using a premium theme “Gospel” that I’ve modified in the form of a child theme. The theme integrates the Event Organizer plugin. I’ve pulled the code that I thought was necessary to show the closest upcoming event and included it in the site header. This works great on all pages of the site with the exception of a single-event.php page, in which case the header event I’ve added displays the earliest created event, and not the next future event.
My site is Riversongwaldorf.org
I’ve setup a temporary fix by marking all past events as private, so right now this page does show an upcoming event (https://www.riversongwaldorf.org/events/event/school-closed-thanksgiving-break/) If I didn’t mark past events as private, the header would show an event from Sept 4 (aka the first event created). But only on single-event.php pages.
Here is my header code (https://pastebin.com/qS33QdxY)
Here is my homepage code where the header event widget works (https://pastebin.com/5FDLqsh2)
And my single-event.php code (https://pastebin.com/JvZv2nta)I just can’t see why it would work on other pages but not the single event pages. Any ideas or direction would be greatly appreciated.
- The topic ‘Next Event in Header – Not working on single event pages’ is closed to new replies.