mardi 31 mars 2015

Load another product in wc_get_template_part

If i use a custom meta name original_post_id to store the id of a related post in woocommerce how can i Load this particular post id in a specific template part?


I tried this but it simply does not work. Please help me correct this.





if ($original_post_id != '' && $original_post_id != 'deleted') {
$original_post = get_post($original_post_id);
$post_title = $original_post->post_title;
$post_content = $original_post->post_content;
wc_get_template_part($post_ID->$original_post_id, 'content', 'single-product' );
}



Aucun commentaire:

Enregistrer un commentaire