[Resolved] Move product title above product image on Woocommerce

Home Forums Support [Resolved] Move product title above product image on Woocommerce

Home Forums Support Move product title above product image on Woocommerce

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1119717
    FunkyCss

    Hi , i want to move the product title above image on my products but i want to display this on a specific pages like archive .

    i have used this code on functions

    remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
    add_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 11 );

    but this also displays in related products that i dont want ! is any recomendation to set this u p?

    #1120013
    David
    Staff
    Customer Support

    Hi there,

    you can try using this function to create a conditional wrap around your remove / add actions:

    add_action( 'wp', function() {
        if ( is_shop() || is_product_category() ) {
            // Remove - Add actions go here
        }
    } );
    #1120613
    FunkyCss

    Hallo David just now i checked about conditional tag etc and is so many good things i can do ! thank you it works really good !

    #1120740
    David
    Staff
    Customer Support

    Glad to be of help

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.