• Resolved moebelzeile

    (@moebelzeile)


    Hello dear community,

    we have created a website for affiliate marketing. Our difficulty of that is, that we cant hide / disable the link behind the preview-image, to get the user away from the single product page. A redirect is installed already.
    The aim is, that the curser is not changing its occur, to get the user to click on the button below the image.
    Is there any php Code for this topic?

    Looking for quality answers.

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @moebelzeile!

    You can use some CSS code, like so:

    .elementor-35 .elementor-element.elementor-element-0edeb32.elementor-wc-products ul.products {
        pointer-events: none;
    }

    This can be added to the “Additional CSS” section found in your customizer.

    Cheers!

    Thread Starter moebelzeile

    (@moebelzeile)

    Hey @rynald0s,

    thank you for your fast reply!

    We’ve tested the CSS and it fits, but not as we expected.
    It is perfect, that the images can not be clicked anymore, but we want the user to click on the button, which is not possible with the sent snippetG. Could you please add the needed CSS to the snippet you’ve sent?

    Thanks a lot!!!

    Cheers!

    Plugin Support Kel C. a11n

    (@kellymetal)

    Hi there,

    Taking a look at your site, I see that the images are still not clickable, while the button below your products can now be clicked and redirect to your Affiliate links:

    clickable buttons but not images
    Link to image: https://d.pr/i/k2vbia

    Based on your description, it looks like you have been able to get things working the way you were trying to — is that correct? If so, then great job! Otherwise, please explain a bit more about which buttons are not clickable. thank you!

    Thread Starter moebelzeile

    (@moebelzeile)

    Hello @kellymetal,

    thanks for your reply!

    Yes, we were able to fix the problem. The php code we’ve used is the following:
    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 );

    Thank you for your support!

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

The topic ‘Disable image link’ is closed to new replies.