• Hi,

    For my shop page, I would like to reposition the product title to be above the product thumbnail. Currently it is under the thumbnail and the price is displayed after the title. I tried looking into the php file, but couldn’t find the title.

    Also, right now there’s a gap between the product title and the price. Is it possible to eliminate the extra line/gap?

    Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hey,
    In your theme options > shop settings if you scroll down to your product title font settings you can change the min-height. If your min-height is larger then your title it would create a gap.

    In terms of re-arranging the template order you would need to use a child theme. Then you would need to add this to the child theme functions.php file:

    remove_action( 'woocommerce_shop_loop_item_title', 'kt_woocommerce_template_loop_product_title', 10 );
    add_action( 'woocommerce_before_shop_loop_item_title', 'kt_woocommerce_template_loop_product_title', 5);

    Kadence Themes

    Thread Starter shoptwofold

    (@shoptwofold)

    Hello,

    Thanks for your reply, I was able to fix the gap issue.
    With regards to rearranging, when I added the suggested to the child theme functions.php file, it added an extra title above the thumbnail, but the title below remained (see below link). Also, the sale sign would’ve blocked partial of the title on top.

    https://www.twofoldshop.com/wp-content/uploads/2016/11/Title-screenshot.jpg

    Is there a way to remove to fix the two issues?
    Thank you.

    • This reply was modified 8 years, 3 months ago by shoptwofold.

    Hey,

    I just tested on my site and the function works for me. Can you confirm that you copied the code from this forum and not from a follow up email?

    -Kevin

    Thread Starter shoptwofold

    (@shoptwofold)

    Hey,

    I copied the code from this forum. I just retested it and its still has the same problem (title above and below the thumbnail). The below is the code I copied.

    remove_action( ‘woocommerce_shop_loop_item_title’, ‘kt_woocommerce_template_loop_product_title’, 10 );
    add_action( ‘woocommerce_before_shop_loop_item_title’, ‘kt_woocommerce_template_loop_product_title’, 5);

    Thanks again.

    hannah

    (@hannahritner)

    Hi shoptwofold,
    Sorry for the delay! Can you confirm that you’re using the latest version of the theme?

    Hannah

    Thread Starter shoptwofold

    (@shoptwofold)

    Hello Hannah,
    Yes, it says on the WP dashboard that my theme is up-to-date.
    Thanks!

    hannah

    (@hannahritner)

    What version does it say? Are you adding anything else into your child theme?

    Hannah

    function custom_init_child() {
    remove_action( 'woocommerce_shop_loop_item_title', 'kt_woocommerce_template_loop_product_title', 10 );
    add_action( 'woocommerce_before_shop_loop_item_title', 'kt_woocommerce_template_loop_product_title', 5);
    }
    add_action('init', 'custom_init_child');

    Add this instead. It will make sure the function runs at the right time.
    Ben
    Kadence Themes

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Reposition product title on shop page’ is closed to new replies.