Custom Posts with Polylang
- This topic has 9 replies, 2 voices, and was last updated 5 months ago by
HardlyWorking.
-
AuthorPosts
-
June 10, 2025 at 4:24 AM #48418
HardlyWorking
ParticipantHello,
It seems like after a recent update, Metabox's custom post types don't seem to work with Polylang's "Duplicate Content" feature.
Basically, when you create a post, you can select this option and it will populate the original language's custom field type values into the translation version boxes. This was really helpful for some post types that essentially had the same information across all languages.
Can someone help look into this? I also queried Polylang support.
June 10, 2025 at 10:36 PM #48426Peter
ModeratorHello,
Thanks for reaching out.
If you use the code to register the custom post type without using Meta Box, do you see the same issue?
Please follow the documentation
https://docs.metabox.io/extensions/mb-custom-post-type/#getting-php-code
https://developer.wordpress.org/reference/functions/register_post_type/June 11, 2025 at 10:29 PM #48429HardlyWorking
ParticipantHello, I put in the PHP from Metabox for the CPT into functions.php but the issue persists.
June 11, 2025 at 10:31 PM #48430HardlyWorking
ParticipantDoes this also mean the CPT needs to be removed from Metabox?
June 11, 2025 at 10:48 PM #48432Peter
ModeratorHello,
Yes, if you register the CPT by code, you can remove the CPT from the UI: Meta Box > Post Types page.
Let me know how it goes.
June 11, 2025 at 11:25 PM #48433HardlyWorking
ParticipantOK, I was able to create the custom post type manually, and remove the CPT from Metabox (I tested this by adding/removing the CPT code from functions.php).
The issue seems like the Custom Fields (created thru MB Custom Fields)related to this CPT post type are not being duplicated anymore for the other languages, but they were before.
June 12, 2025 at 10:34 PM #48434Peter
ModeratorHello,
Thank you for the details. I can reproduce the issue on my demo site and I've escalated this to the development team to support duplicating the field value along with the post.
Hopefully it will be available soon.
June 17, 2025 at 5:23 AM #48460HardlyWorking
ParticipantHello, I just found an additional related issue. I tried to add a new field to the custom fields (file_advanced) and it won't save due to something between Metabox and Polylang.
Maybe this is related.
June 18, 2025 at 9:00 PM #48470Peter
ModeratorHello,
Can you please follow the documentation to set the field group translation to Translate and recheck the issue with the field value when duplicating the post?
https://docs.metabox.io/integrations/polylang/#custom-fieldsJuly 9, 2025 at 1:16 AM #48550HardlyWorking
ParticipantHi Peter,
I'm sorry I did not get to this earlier. I tried your suggestion for changing the field group translation to translate, and it now works as expected.
Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.