How to save post in certain language
-
Hi,
I have made a custom form in caldera forms, to submit custom post type in front-end, I have done my own save this custom post type in pods, cause this custom type is defined in pods.
The problem is that no language info is saved with it.
I have tried to use pll_set_post_language( $custom_post_type_id, $lang_slug) but that is not working.
Also if I use pll_current_language() in functions.php in my theme, I get no info.I have done this all in functions.php theme file in a function that is run after a submit button on the form is hit. All data is saved normally, but no language information.
I am using polylang 2.0.10. The $lang_slug has values like ‘en’, ‘sl’..
What am I doing wrong?
Is there any other way to do this?
The topic ‘How to save post in certain language’ is closed to new replies.