• Resolved rdxcsgoid

    (@rdxcsgoid)


    Hello,
    I am hooking a function into woocommerce product on shop page.
    By default woocommerce_template_loop_product_link_close closes after product ratings but i want it to close just after the image thumbnail. So i am using this actionn which works fine.

    add_action('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 1);
    But if i hook any other function , suppose after product price.

    add_action('woocommerce_after_shop_loop_item_title','my_function',11);

    it again opens the product link only for that hooked element.
    This only happens in virtue? How can i fix it
    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter rdxcsgoid

    (@rdxcsgoid)

    Ohh Rating template has the product link.
    <a href="<?php the_permalink(); ?>"><?php echo $rating_html; ?></a>
    Is there anyway i can remove this permalink from functions.php? instead of making changes to template?

    Hey,
    I’m confused what your wanting to do? The rating is a link to the product are you wanting to just show the rating without linking to the product?

    Kadence Themes

    Thread Starter rdxcsgoid

    (@rdxcsgoid)

    Yes, but without editing the template (loop/ratings)

    Ok so yeah there isn’t an option for that.
    Curious can you tell me why you don’t want a link?

    Kadence Themes

    Thread Starter rdxcsgoid

    (@rdxcsgoid)

    I was creating a plugin which appends a wishlist button inside ratings field.
    so the button doesn’t work because of the link.
    Although its better to have link for ratings fields. But doesn’t work in my case 🙂

    Why not call in the wishlist button right after the ratings?

    Would that not work?

    Kadence Themes

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Closing product link’ is closed to new replies.