Tagged: avia layout builder, shortcode
Hi guys,
I’m wondering if there is a shortcode that i can use to display the product_meta in a customized single product page. Or if there is a simple way to create a shortcode to display the product_meta (such as the plugin additions (product Info) in the avia layout builder)
I just want to be able to display the product_meta on a custom page
Thanks!
I had help from the plugin developer, Mike Jolley.
For those who are interested…
Here is the code i use to create the shortcode for the SKU
function cat_shortcode(){
global $post;
$cat = get_the_term_list( $post->ID, 'product_cat', true );
return $cat;
}
add_shortcode( 'cat', 'cat_shortcode' );
And this code is for the Category
function cat_shortcode(){
global $post;
$cat = get_the_term_list( $post->ID, 'product_cat' );
return $cat;
}
add_shortcode( 'cat', 'cat_shortcode' );
Hi Benoit!
Thank you for sharing the tip here :)
Cheers!
Vinay
It is a pleasure :)