Okay
  Public Ticket #2734009
Woocommerce shop page images needs to be Clickable
Closed

Comments

  • GDMW started the conversation

    I need my product images to be clickable.

    I have used a code:

    <?php
     
    if ( ! function_exists( 'woocommerce_get_product_thumbnail' ) ) {
    /**
    * Get the product thumbnail, or the placeholder if not set.
    *
    * @subpackage Loop
    * @param string $size (default: 'shop_catalog')
    * @param int $deprecated1 Deprecated since WooCommerce 2.0 (default: 0)
    * @param int $deprecated2 Deprecated since WooCommerce 2.0 (default: 0)
    * @return string
    */
    function woocommerce_get_product_thumbnail( $size = 'shop_catalog', $deprecated1 = 0, $deprecated2 = 0 ) {
    global $post;
    if ( has_post_thumbnail() ) {
    return '<a href="' . get_permalink( $post->ID ) . '">' . get_the_post_thumbnail( $post->ID, $size ) . '</a>';
    } elseif ( wc_placeholder_img_src() ) {
    return wc_placeholder_img( $size );
    }
    }
    }

    but it didn't work for me.

  •  675
    Neuron replied

    Hi,

    I am sorry for the late reply, we did not work on the weekend.

    There's no need for the extra PHP I guess, you can do this with some simple Custom CSS in Appearance > Customize > Additional CSS.

    .o-neuron-hover.o-neuron-hover--icon .o-neuron-hover-holder .o-neuron-hover-holder__body > a {
        z-index: 10000 !important;
    }

    Feel free to ask for anything you need.

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.

  • GDMW replied

    Hey,


    Thanks a lot for the help, It works.


    Also, need to ask can we move product filters above products on mobile.

  •  933
    Neuron replied

    Hi,

    Can you please provide me with your wp-admin, I will change some code of the theme to change the order of the shop pages content.

    Feel free to ask for anything you need.

    Kind Regards


  •   GDMW replied privately
  •  933
    Neuron replied

    Hi,

    I'm so sorry for the late reply, somehow I missed your ticket.

    Can you please add the following code at Appearance > Customize > Additional CSS?

    @media (max-width: 768px) {
     .tax-product_cat .l-theme-wrapper .container .l-woocommerce-wrapper .row{
            display: flex !important;
        flex-direction: column-reverse !important;
    }
    }
    

    Feel free to ask for anything you need.

    Kind Regards


  • GDMW replied

    Thank you very much

  •  933
    Neuron replied

    You are welcome anytime, feel free to ask for anything you need

    If you like our theme, please leave us a rate of 5 stars at ThemeForest, that would help us a lot.

    Kind Regards,
    NeuronThemes