• Resolved unicrypt

    (@unicrypt)


    I have placed category shortcode on a page and i have pretty simple products so i would like remove links from those product thumbnails.
    I got all the other links away to the products but the one when i add picture to it.

    Tried to edit product-image and product-thumbnail.php files, but that didn’t remove the links.

    Any suggestions how i could get those thumbnail links away?

    Thanks!

    https://www.ads-software.com/plugins/woocommerce/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    remove_action( 'woocommerce_before_subcategory', 'woocommerce_template_loop_category_link_open', 10 );
    remove_action( 'woocommerce_after_subcategory', 'woocommerce_template_loop_category_link_close', 10 );
    Thread Starter unicrypt

    (@unicrypt)

    Thank you, I have tried this one already but it doesn’t remove links from those thumbnails. Other links will go away with this one tho.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    On which page? Link?

    Thread Starter unicrypt

    (@unicrypt)

    I made quick example page, since real product page is behind login.

    Edited links away.

    I have those remove_action lines in child themes function.php.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    They are products not categories? Products use different hooks https://github.com/woothemes/woocommerce/blob/master/includes/wc-template-hooks.php#L94-L95

    Thread Starter unicrypt

    (@unicrypt)

    Sorry about that! I changed the lines in function, but it still keeps links in images.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    You’d use this for those other hooks:

    remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );
    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );

    If its still linked after doing this, the theme might be changing how links are added, in which can I cannot tell you how to change it.

    Thread Starter unicrypt

    (@unicrypt)

    Thank you, the last one did change my test product without image. Other’s didn’t, so it looks like i have to start digging it from the theme’s side.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    You can always apply the above codes to default Twenty Twelve theme to see if its theme or code related.

    Thread Starter unicrypt

    (@unicrypt)

    It was theme related, it was linking thumbnails to the posts. Got it figured out. Thank you for pointing right direction!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Removing category thumbnail links’ is closed to new replies.