Title: nikwitting's Replies | WordPress.org

---

# nikwitting

  [  ](https://wordpress.org/support/users/nikwitting/)

 *   [Profile](https://wordpress.org/support/users/nikwitting/)
 *   [Topics Started](https://wordpress.org/support/users/nikwitting/topics/)
 *   [Replies Created](https://wordpress.org/support/users/nikwitting/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/nikwitting/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/nikwitting/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/nikwitting/engagements/)
 *   [Favorites](https://wordpress.org/support/users/nikwitting/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Close product image lightbox with Android/iOS back button](https://wordpress.org/support/topic/close-product-image-lightbox-with-android-ios-back-button/)
 *  Thread Starter [nikwitting](https://wordpress.org/support/users/nikwitting/)
 * (@nikwitting)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/close-product-image-lightbox-with-android-ios-back-button/#post-12905934)
 * Problem solved.
    After some time i found the term “deeplinking lightbox” to be
   useful in my search. Most deeplinking lightboxes allows you to acces the open
   lightbox with a link but still the back button did either go to far back or did
   not close the lightbox at all. I then found this useful site comparing lightboxes,
   with a demo for each: [https://justifiedgrid.com/lightboxes/](https://justifiedgrid.com/lightboxes/)
   I tested them all and found the PhotoSwipe lightbox to be the only one with the
   right functionality such that the back button actually closes the lightbox as
   intended while staying in the same page.
 * From WordPress i then added the plugin named “Lightbox with PhotoSwipe”
    And 
   to allow it to work on the woocommerce product images I disabled the standard
   lightbox by adding the following to functions.php:
 *     ```
       add_action( 'wp', 'tu_disable_wc_lightbox', 20 );
       function tu_disable_wc_lightbox() {
           remove_theme_support( 'wc-product-gallery-lightbox' );
       }
       ```
   
 * Quite surprises that I only found this single plugin among many with this quite
   basic but effective functionality.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Close product image lightbox with Android/iOS back button](https://wordpress.org/support/topic/close-product-image-lightbox-with-android-ios-back-button/)
 *  Thread Starter [nikwitting](https://wordpress.org/support/users/nikwitting/)
 * (@nikwitting)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/close-product-image-lightbox-with-android-ios-back-button/#post-12905370)
 * Thank you for your response.
 * I do link to the regular product itself. The problem is that most of my users
   then from the regular product page click on the image to enlarge it. After spending
   some time looking at the image maybe 50% click on the back button. Then they 
   are moved all the way back to Facebook instead of just back to the regular product
   page.
 * So what I would like is for the backbutton instead to just go back to the regular
   page.
 * I agree with regards to changing the behaviour.
 * So a solution that in someway instead of opening the lightbox in the same URL
   open it at with eg. an empty parameter:
 * website.com/product?=
 * Should allow the backbutton to go back to website.com/product while still allowing
   the usual lighbox closing options.
    -  This reply was modified 5 years, 11 months ago by [nikwitting](https://wordpress.org/support/users/nikwitting/).

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