Provides an instant overview of your shop's current customers and the contents of their carts.
Since the WPML documentation is terrible and all its support forum’s topics are closed prematurely it’s always difficult to get something done with WPML.
As a result of some research, here’s a snippet to help inserting a post (of any post type) in multiple languages programmatically. The resulting posts will be linked to each other just like if you’d create a translation in the graphical interface.
global $sitepress;
$post_type = 'post';
$primary_language = 'en';
$secondary_language = 'nl';
$primary_post_id = wp_insert_post( array(
'post_type' => $post_type,
'post_title' => 'Title',
'post_content' => 'Content',
) );
$secondary_post_id = wp_insert_post( array(
'post_type' => $post_type,
'post_title' => 'Titel',
'post_content' => 'Inhoud',
) );
$trid = $sitepress->get_element_trid( $primary_post_id, 'post_' . $post_type );
$sitepress->set_element_language_details( $secondary_post_id, 'post_' . $post_type, $trid, $secondary_language );
Posted by Berend on
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Thx!
Failed to load resource: the server responded with a status of 500 (Internal Server Error) after import post
And what about taxonomys? attachments? metas? huh?