Translate site via code insert
-
Hello,
I’m using the wp_insert_post() function to add new posts. Is there a way to assign a language to the post programmatically, thus eliminating the need for manual editing in the backend editor?
$post_data = array('post_title' => $job_name,'post_content' => $content,'post_type' => $custom_post_type,'post_status' => 'publish',);$post_id = wp_insert_post($post_data);
It gets exhausting when you have to manually adapt 10 posts with different content in different languages.
So is there any function I can use, to set a specific language to a post?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Translate site via code insert’ is closed to new replies.