It was way easier than I thought…
I’ve just opened the user-submitted-posts.php file and it was in front of my eyes!
Just changed the line 254 from:
pll_set_post_language($post_id, pll_default_language());
to
pll_set_post_language($post_id, pll_current_language());
and it’s done!
Hi Jeff! Thanks for helping me out!
Unfortunately in my case it doesn’t work this way. My default language is English. I’m selecting another language and I’m navigating to the page where the post submission form is. The language set for this page is also not the default one (English) but the one I’ve selected. But the post created by the form is in English instead of the other language. I don’t know if it matters but I’m still mentioning it: In Polylang settings I am using the option “The language is set from content” under the “URL modifications section. I need that and I can’t change it.
Thanks again for you time!