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 2 replies, has 2 voices.

Last updated by tomB-16 2 weeks, 2 days ago.

Assigned support staff: Bruno.

Author Posts
September 30, 2019 at 10:15 am

tomB-16

I am trying to: translate a custom post type slug

I have a custom post type 'production'. The slug should be translated to 'producties' in dutch.
hidden link

I have enabled string translation & translation management. Checked 'Translate custom post types via WPML string translation'. When I try to edit the custom post type slug, I get the error 'Production slugs are set to be translated, but they are missing their translation'.

In my post type registration, I rewrite the slug like:
'rewrite' => array(
'slug' => 'productions',
'with_front' => false,
)

September 30, 2019 at 7:22 pm #4667347

Bruno
Supporter

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

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

Thank you for contacting us. I believe this must be happening because you are calling the Custom_Post_Types constructor to create the posts type later.

On the file themes/fransbrood/app/custom-post-types.php in line 7:

add_action( 'init', array( $this, 'generate_cpts' ), 99 );

If you change this to 10 or 0 to be fired earlier, the problem should probably be resolved.

add_action( 'init', array( $this, 'generate_cpts' ), 10 );

By following the steps above, please let me know if the problem persists.

Thank you.

September 30, 2019 at 7:54 pm #4667393

tomB-16

My issue is resolved now. Thank you!