[Resolved] Custom post type field not showing translations on the frontend
This thread is resolved. Here is a description of the problem and solution.
Problem: The client's custom post type field is not displaying translations on the frontend. Solution: We recommend ensuring that if you are selecting a taxonomy or a custom post type in your code, you must also select the translated version of that taxonomy or custom post type. If the slug is translated for the post type or taxonomy, but not updated in your code, this could be the reason why the translations are not appearing on the frontend.
If this solution does not apply to your situation, or if it seems outdated, we encourage you to open a new support ticket. We also highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Please allow admin access to the site so that I can review templates and ACF settings. Once that is done, let me know and I'll be happy to further troubleshoot.
So I noticed one thing while testing the ACF Block coworker on these two pages: hidden link hidden link
Depending on if I choose to show coworkers from a specific department or show all coworkers, the translation is displayed on frontend. But when I select the option Show specific coworker the translation don't display.
I attach a screenshot of the field group for the block that is used on these pages and the page Styrelse (Board) that we first discovered the problem on.
I am still trying to figure it out. Can you see anything?
And this is the code template for the block:
<?php
/**
* The template for the coworker block
*
* @package Gital Blocks
*/
Make sure that if you are selecting a taxonomy, if you have translated it, you will need to select the translated taxonomy in your code. Same with the post type - if the slug is translated in either the post type, a taxonomy, etc, but not in your code, then this could explain why the post translations are not showing.