Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client needed to change the archive title from 'Press Releases' to 'Comunicados de Imprensa' for a custom post type created with ACF Pro.
Solution:
We informed the client that it is currently not possible to translate custom post types created with ACF Pro. For more information, please refer to the WPML errata page: Advanced Custom Fields 6.1+ Custom Post Types and Custom Taxonomies Labels Not Translatable Yet.

If this solution does not seem relevant to your issue, please feel free to open a new support ticket in 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.

Tagged: 

This topic contains 3 replies, has 3 voices.

Last updated by Mateus Getulio 1 year, 6 months ago.

Assisted by: Mateus Getulio.

Author Posts
December 15, 2023 at 10:53 am #15071407

jenniferM-27

Hi, we have a custom post type called "Press Releases" using the ACF Pro plugin. I have managed to change the slug for /press-releases/ to /comunicados-de-imprensa/ but cannot find how to change the title that appears on the page from Press Releases to Comunicados de Imprensa.

I am using a custom archive template called archive-press-releases that uses <?php echo the_archive_title(); ?> to output the aerchive title.

Any help is greatly appreciated.

Thanks,

Ryan

December 15, 2023 at 4:36 pm #15075293

Laura
WPML Supporter since 05/2018

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hi,

thanks for contacting us.

Currently it's not possible to translate post types created with ACF, see https://wpml.org/errata/advanced-custom-fields-6-1-custom-post-types-and-custom-taxonomies-labels-not-translatable-yet/

December 15, 2023 at 4:43 pm #15075367

jenniferM-27

Hi Laura,

Thanks for getting back to me. Would a workaround be to create the press release post type manually?

Thanks

December 18, 2023 at 5:29 pm #15086599

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello Ryan,

That's correct.

An attempt you can make prior to proceeding to this workaround should be replacing the 'echo' with '_e' and then trying to translate the title inside String Translation.

Eg.:

<?php _e(the_archive_title(), 'your_textdomain_name'); ?>

- Replace the domain name with your text domain, eg.: archive-title.
- Then go to WPML -> String Translation and enable the option 'Look for strings while page is rendered'
- Go to the page in the front end where the title appears so WPML can process the strings in there
- Back in String Translation screen: uncheck the option 'look for strings...'
- Search for the title you want to translate and see if you can find it there

If it doesn't work, given the compatibility status explained by my colleague, I'm afraid the workaround you mentioned would become necessary.

Thank you, please let us know.