Support » Plugin: WooCommerce » Woocommerce 3.0 gallery trigger over full image – possible?

  • Max

    (@art-woodde)


    Dear woocommerce users,

    I am using woocommerce v3.0 and the new gallery functions. Its set up nicely and runs without problems.

    I only want to change one little thing I can’t find how to do. It would be great if the gallery can be triggered by a single click somewhere in the image. And not only by the little gallery trigger button.

    Maybe its a little change in css?

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

    (@raftaar1191)

    Hi @art-wood.de

    I have create an small gist for you which will allow your used to click on the images and it will open up that images in gallery.

    I am adding an script in wordpress footer action that will add some JS which will open the gallery when user click on the images

    Copy the code from the below link and past it in your themes functions.php files
    https://gist.github.com/raftaar1191/1a352650fc60569243641bab90abc332

    Hope this wil be help full for you

    Regard
    Deepak Gupta

    Max

    (@art-woodde)

    Hi Deepak,

    wow! Thank you so much for your help. That works perfect on desktop resolutions!!

    But now on mobile resolutions this functions overwrites the swap function for the gallery. Is it possible to get the swap function on mobile resoultions into your code snippet too?

    raftaar1191

    (@raftaar1191)

    Hi @art-woodde

    Nice to hear that it’s working but it’s sad that it’s not working in mobile. I have edit the gist for you on the same link
    https://gist.github.com/raftaar1191/1a352650fc60569243641bab90abc332

    Now this JS will only run in desktop not in mobile devices. The function that is used is wp_is_mobile

    Regards
    Deepak Gupta

    • This reply was modified 2 years ago by  raftaar1191. Reason: Remove some words
    Max

    (@art-woodde)

    Hi Deepak,

    wow that worked well!! Thank you so much, you really helped me a lot. And your help was so fast!

    All the best for you,
    Max

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Woocommerce 3.0 gallery trigger over full image – possible?’ is closed to new replies.