Skip Navigation

[Resolved] Single Event Layout Shows content twice

This support ticket is created 7 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by ChuckGregory 7 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#461697

I am trying to: customize display of events

I visited this URL: hidden link

I expected to see: the description of the event, which I plan to customize with layouts

Instead, I got: the description showing up in the main post body where it belongs, and then again at bottom of page after footer

I have copied the following from my most recent reply on my other current support ticket, because they are really separate issues. Nigel is working on the other one, and should be assigned to this one, too.

The single event display is behaving oddly. Sample:
hidden link
As you can see here, the event content is showing twice, once where I expect it and again below the footer. I need to resolve that, and then do major restructuring of the content that is displayed. My Calendar support says:
===
So, what my filter checks, in order, are:

is_single()
in_the_loop()
is_main_query()
does $post->post_type == 'mc-events'

In order for the replacement to happen, all of these have to be true.

It really doesn't make a lot of sense for this to happen. The $post variable is pulled from global scope, so for that to happen is reasonable; but the check for 'is_main_query()' really shouldn't be returning as true in the footer post.

This seems like a bug in whatever is producing the footer data; it shouldn't be doing anything that causes that query to identify as the main query.
===
The event page is under control of a layout, so he's saying there's a bug in the toolset code, or else in the way I've applied it.

This is very urgent, the site is supposed to go live today and I still have to customize the event display once we get it not to show twice

#461780

[edit]

#461959

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Chuck

I dug around in your site and tried to reproduce your setup on my local test site to produce the same problem—which I was able to.

I tracked the problem down to the inclusion of the Visual Editor Cell in the footer. When I removed that the duplicate event disappeared. Something there is confusing the events plugin (I wouldn't like to speculate as to whether the issue lies with us or with them, other than to say it doesn't appear to be a problem more generally).

To get round this issue I simply replaced the visual editor cell—which is for your copyright notice—with a text widget with the same content. That seems to have fixed it, though you may need to adjust the styling.

Once I had identified the problem on my test site I added the workaround to your live site, so you can see for yourself.

#462053

Outstanding! Thank you so much! Now I can get on with the real work of styling the events. Hopefully won't need help on that, if I do I'll do it as a new ticket.

Thanks again.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.