manojjoshi
Forum Replies Created
-
this code is not working
add_action( ‘woocommerce_before_shop_loop_item_title’, ‘aq_display_brand_before_title’ );
function aq_display_brand_before_title(){
global $product;
$product_id = $product->get_id();
$brands = wp_get_post_terms( $product_id, ‘pwb-brand’ );
foreach( $brands as $brand ) echo ‘<p>’.$brand->name.'</p>’;
}See the URl
http://socialbrandingplatform.com/e-style/shop
- This reply was modified 6 years, 3 months ago by manojjoshi.
add_action( ‘woocommerce_before_shop_loop_item_title’, ‘aq_display_brand_before_title’ );
function aq_display_brand_before_title(){
global $product;
$product_id = $product->get_id();
$brands = wp_get_post_terms( $product_id, ‘pwb-brand’ );
foreach( $brands as $brand ) echo ‘<p>’.$brand->name.'</p>’;
}This code is not working
http://www.socialbrandingplatform/e-style/shopI tried this code
but still it is not showing brand nameadd_action( ‘woocommerce_before_shop_loop_item_title’, ‘aq_display_brand_before_title’ );
function aq_display_brand_before_title(){
global $product;
$product_id = $product->get_id();
$brands = wp_get_post_terms( $product_id, ‘pwb-brand’ );
foreach( $brands as $brand ){
echo ‘term_id).'” class=”category uppercase is-smaller no-text-overflow product-cat op-7″>’;
echo $brand->name;
echo ‘‘;
}
}