Skip Navigation

[Resolved] Conditional for archive output not displaying correctly

This support ticket is created 3 years, 3 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by fleurP 3 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#2158151
Screenshot 2021-09-02 at 11.36.44.png
Screenshot 2021-09-02 at 11.36.34.png

I have conditionals setup for my CTP archive. t present it keeps displaying information duplicated where it suppose to only display one instance with the conditional rules put in place. On the backend in the block editor the instant preview displays correctly, but on the front-end it is incorrect. See attached...,

#2158549

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Fleur,

Would you mind providing the admin access for this site again as it was removed from our previous ticket after it was closed.

Thanks,
Shane

#2160091

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Fleur,

I would recommend opening a new ticket for your second issue as this ticket is focused on the issue of the duplicate entry in the archive.

Taking a look at this now, it would appear the issue is being caused by your conditional.

It could be that the items that are duplicated because they meet both the conditionals. I would recommend re-adjusting the conditionals to ensure that the post can only meet one of the requirements.

The first conditional is essentially saying Display all the posts that don't contain X and the other is saying display all posts that contain Y.

In this scenario it is possible that post A doesn't have X but contain Y which will cause it to display twice.

Thanks,
Shane

#2161749

My issue is resolved now. Thank you!