Navigation überspringen

[Gelöst] Conditional content template is duplicated

This support ticket is created vor 2 Monaten, 2 Wochen. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von amandaD vor 2 Monaten, 2 Wochen.

Assistiert von: Minesh.

Author
Artikel
#2778298
Screenshot 2024-10-18 103717.png

Tell us what you are trying to do?
I have a conditional block (using the classic editor) that displays an error message if the date has passed, and a registration form if the date is in the future. However, the block appears to be duplicated. Here is the conditional:

```
[wpv-noautop]
[wpv-conditional if="( $(wpcf-event-registration-required) eq 'true' )"]
<!-- Registration required -->
<h2>RSVP to this event</h2>

[wpv-conditional if="(( $(wpcf-event-start-date) - 86400) gte 'NOW()' )"]
[gravityform id="[types field='event-form-id'][/types]" title="false" description="true" ajax="true" tabindex="49" theme="orbital" field_values="event=[wpv-post-title output='sanitize']&date=[types field='event-start-date' style='text' format='d/m/Y'][/types]"]
[/wpv-conditional]

[wpv-conditional if="(( $(wpcf-event-start-date) - 86400) lte 'NOW()' )"]
<div style="background: #FFF8F9; border: 1px solid #B71C1C; border-radius: 3px; color: #B71C1C; font-weight: 400; padding: 20px;">
<i class="fa-solid fa-x"> Sorry, this event has already passed, and registration is now closed.
</div>
[/wpv-conditional]

[/wpv-conditional]
[/wpv-noautop]
```

Attached is an image of the duplication, and you can also see it in the link below

What is the link to your site?
versteckter Link

#2778306

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

That is strange.

I need to check what's going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2778315

Thanks - I think I've fixed it though - I didn't have a filter setting the relationship. Thanks so much...

#2778316

For anyone else with this issue: don't forget to set the filter on your View to limit the results to the post being shown. My problem was that it was showing this field for all my custom post types, not just the single one being displayed. Since the message was generic, it looked like a duplicate.