• Resolved En18Zone

    (@en18zone)


    Hello

    How can i move the product price on category page to right after the title and before product description? Right now i have it like below

    woocommerce-loop-product__title
    woocommerce-product-details__short-description
    price

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t think the excerpt is output by the WooCommerce plugin, so maybe you have a theme template override? Have a look at:
    wp-content/themes/your-theme-name/woocommerce/archive-product.php
    to see the order of the elements.

    The technique is to remove the price with something like:
    remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
    then put it back in with a lower priority so its above the excerpt:
    add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 6 );

    However, the exact hooks and priorities will depend on your theme’s archive-product.php which is not available to forum members.

    Your code goes in functions.php for your child theme or you can use the “My Custom Functions” plugin.

    Some PHP skill will be needed.

    Thread Starter En18Zone

    (@en18zone)

    Thanks for the pointers @lorro. GeneratePress theme developer provided a snippet that worked great.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Move price on category page’ is closed to new replies.