Custom post types support
-
I guess the plugin doesn’t support custom post types? Or is there a hidden setting or a function that allows us to translate also CPTs… ?
-
Hi, thank you for reaching out to us. Could you please share more details about the output you want to achieve? Providing a reference or screenshot would be helpful.
Well, with your plugin one can translate normal blog posts or pages, even contact form 7 forms can be translated which is amazing. But I created a custom post type through functions.php, called events… but these don’t have the option to be translated. They don’t have this option to switch between the language right at the top left of the edit page…

Hi, could you please confirm if you want to add a language switcher? For example, an option that allows you to translate the page into your preferred language with a single click?
normally I can translate pages and blog posts with yiur plugin… but I don’t have this option for my custom post type…if you see the image I provided above this can be achieved with the language switcher while editing a post or page.. resulting in different language versions of the sme page… but I can’t do this for a custom post type
Hi, could you please share a short video showing the steps you are taking to add a custom post on your end? This will help us review the process. Additionally, please share the URL where you have added the custom post type and the translation is not working, so we can check further.
Certainly, here it is
https://app.screencastify.com/v3/watch/N9uKTqTkzUzuklaJ3ADu
While talking I have made an error and instead of the word “pages” I said “posts”. So, you can see the option to edit the language for blog posts and pages, but not for the custom post type “events”Hi, Thank you for sharing this. We are currently checking this concern and will provide you an update shortly. We kindly request your patience in the meantime.
Perfect, thank you π
Highly interested.
Following…
Hi, Kindly go to the theme’s functions.php file and add this filter once. Try it and let us know if it works.
Note: Replace ‘custom_post_type_name‘ with your actual post type name.
/* To enable support for custom post types */
add_filter(‘wpm_posts_config’, ‘wpm_custom_post_type_clbk’);
function wpm_custom_post_type_clbk($config){ $config[‘custom_post_type_name’] = array();
return $config;
}/* To enble support for custom post meta fields */
add_filter(‘wpm_post_fields_config’, ‘wpm_custom_post_type_meta_fields’);
function wpm_custom_post_type_meta_fields($config)
{
$config[‘custom_meta_field’] = array();
return $config;
}Also, we have raised a GitHub ticket regarding this concern and are planning to add a feature that will simplify this process, so you wonβt need to add any filters again.
Here is the ticket.
Wow, that’s perfect!!!!! It works, thank you so much!!! It works also on the fields I created with the ACF Plugin. You are amazing. Btw, if you publish this option / asset in one of the next updates, will I have to remove this code from my functions.php or will it not interfere?
Hi, for now please keep this code but once the update is released, you can remove it. We will notify you here once the new update is available. We kindly request your patience in the meantime.
Thanks, you are amazing. Already a 5 star review from me.
Thank you so much! I really appreciate your kind words and the 5-star review!π
Hi All,
Hope you are doing well. We have just released an update version 2.4.18 that addresses this concern. The latest version now includes an option in the admin panel to choose a custom type, which removes the need to use hooks or filters like before.
Go to WP Multilang settings, and you will find this option βPost Typeβ at the bottom. Please try using it once and let us know if you face any issues.
The topic ‘Custom post types support’ is closed to new replies.