Background of the issue:
I am trying to display content on my site hidden link. Specifically, on the page hidden link, which shows a custom CPT named People.
Here's the file that builds this page:
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: Europe/Vienna (GMT+02:00)
Hi,
Before your ticket is assigned to one of my colleagues, please allow me to guide you through some initial debugging steps to help speed up the support process.
Yes, you can try posting it again in your next reply; then, nothing should be cut inside a second reply.
Additionally, please make sure that your WP_Query includes the following line:
I hope you're doing well. I have taken over this ticket and will be happy to assist you further in this matter.
To include `'suppress_filters' => false` in your code, you need to add it to the appropriate query parameters. This is usually necessary when using functions like `get_posts` or `WP_Query`. You can open the teaser template (`template-parts/people/person`) and check the query defined there. If you can share the code from that template, I can also guide you on how to add that filter.
However, I checked the `Leadership` page and can see that all the images are now showing only once. I haven't noticed any duplicates. If the issue is happening randomly, it would also be better to check by clearing the caches from your site and browser.
Let me know if the information above helps or if you need further assistance in this matter. I will be happy to help.
The French content only shows on the English page once in a while, and we can't replicate the problem on command. It's possible it's a caching issue, but the cached copy of the English page shouldn't ever contain French content, right?
Here's the code from /template-parts/people/person-teaser.php:
Based on the provided template code, it looks fine. The data being displayed is a combination of post details, categories, and custom fields. Since you're not querying any posts directly in this template, I don't think the `suppress_filters` parameter is required.
However, while checking the WPML Debug info, I noticed that a certain post type is set to "Translatable - use translation if available or fallback to default language." If the persons you're displaying are part of a post type that is set to display as a fallback, you may encounter this issue. Please set the post type associated with the Person to "Translatable - only show translated items" by going to "WPML > Settings > Post Type Translation." Once done, please continue to monitor if the issue is happening again or not.
Additionally, if object caching or server-level caching is enabled, please clear those caches. While cache is typically stored for each language version, it is always best to clear them to ensure they are not causing the problem
For your information, I took another look from a different browser and can confirm that the persons are now showing correctly on the page. But, please feel free to let me know if you need further assistance or clarification on any point. I will be happy to help.
Thanks. I'm waiting for the site owner to make a decision about choosing "Translatable - only show translated items" because some content isn't yet translated.