Home Forums WoodMart support forum Logo Image On Product Loop

Logo Image On Product Loop

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #376868

    atdsro
    Participant

    Hi,

    I want to show the product logo (with link) near the product title. I tried this PHP code, but it seems like it can not take the image correctly.

    function brands_in_loop(){
    global $product;
    $output = array();
    $product_brands = wp_get_post_terms( $product->get_id(), woodmart_get_opt( ‘brands_attribute’ ) );
    echo ‘<div class=”custom-loop-brands”>’;
    foreach ( $product_brands as $brands ) {
    $image = get_term_meta( $brands->term_id, ‘image’, true );
    if ( $image ) {
    echo ‘<span class=”marca-archivos”>slug ) . ‘” alt=”‘ . esc_attr( $brands->slug ) . ‘” /></span>’;
    }else{
    echo ‘<span class=”marca-archivos”>’ . $brands->name . ‘</span>’;
    }
    }
    echo ‘</div>’;
    }
    add_action( ‘woocommerce_shop_loop_item_title’, ‘brands_in_loop’, 5 );

    Can you help me with that? Thanks

    #377036

    Artem Temos
    Keymaster

    Hi,

    Unfortunately, there is no such option in our theme and WooCommerce by default. It may require additional code customization or an extra plugin but we don’t have an instruction for this. It is out of our theme support scope.

    Regards

Viewing 2 posts - 1 through 2 (of 2 total)