• Resolved abeldb

    (@abeldb)


    Hello!

    Fantastic plugin, congratulations!


    I wolud add variation or color on description/title archive page varition.

    Can you tell me a piece of code to add in function.php childteme to add variation (img or color) to show on description-tax archive page?

    Thanks in advance!

    —-
    Something similar to:

    add_action( 'woocommerce_archive_description', 'custom_att_display', 10 );
    function custom_att_display(){
        if(is_product_category()){
            global $product;
            $attribute_names = array('pa_color', 'pa_acabados', 'pa_materia');
            foreach( $attribute_names as $key => $attribute_name ) {
                $attribute_value = array_shift(wc_get_product_terms( $product->id, $attribute_name));
                if(!empty($attribute_img) || $attribute_img == '0' ){
                    echo $attribute_img;
                }
            }
        }
    }
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Variaton image on archive title’ is closed to new replies.