Title: Additional Selectors doesn&#8217;t work?
Last modified: June 13, 2023

---

# Additional Selectors doesn’t work?

 *  Resolved [outdoorsdev1](https://wordpress.org/support/users/outdoorsdev1/)
 * (@outdoorsdev1)
 * [3 years ago](https://wordpress.org/support/topic/additional-selectors-doesnt-work/)
 * Suddenly all of the selectors I had that were allowing simplelightbox to work
   aren’t. I’ve added gb-block-image,simplelightbox,card in the additional selectors
   but it stil only works with wp-block-image, can you help?
 * This seems to be the case for things in the sidebar as well as on custom post
   types

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

 *  [olekristoffersen](https://wordpress.org/support/users/olekristoffersen/)
 * (@olekristoffersen)
 * [3 years ago](https://wordpress.org/support/topic/additional-selectors-doesnt-work/#post-16821142)
 * [@outdoorsdev1](https://wordpress.org/support/users/outdoorsdev1/) Everything
   stopped working for me as well. 
   It seems like something went wrong in the latest
   update/version.I decided to just rollback to “Version 2.14.1” with WP Rollback(
   [https://wordpress.org/plugins/wp-rollback/](https://wordpress.org/plugins/wp-rollback/))
   Everything worked again right away
 *  Thread Starter [outdoorsdev1](https://wordpress.org/support/users/outdoorsdev1/)
 * (@outdoorsdev1)
 * [3 years ago](https://wordpress.org/support/topic/additional-selectors-doesnt-work/#post-16821480)
 * Thanks!
 * This worked for me, the immediate last version is fine.
 * Additionally as a seperate issue the simple-lightbox.legacy.min.js file is loading
   instead of the standard js script, even though I don’t have legacy selected in
   the options.
 *  [Katie Ayres](https://wordpress.org/support/users/1happyplace/)
 * (@1happyplace)
 * [3 years ago](https://wordpress.org/support/topic/additional-selectors-doesnt-work/#post-16821975)
 * It is the same here – the lightbox stopped working altogether, so I rolled it
   back to 2.14.1.
 * I investigated and a change was made to line 57 of setup.simplelightbox.js, where
   a regular expression is analyzing the filename , it was changed from this:
 *     ```wp-block-code
       return /\.(jpe?g|png|gif|mp4|webp|bmp|pdf)(\?[^/]*)*$/i.test(item.getAttribute("href"));
       ```
   
 * to this:
 *     ```wp-block-code
       var thumbnails = Array.from(anchors).filter(function (item) {
       			return /\.(php_vars.ar_sl_fileExt)(\?[^/]*)*$/i.test(item.getAttribute("href"));
       		});
       ```
   
 * Interestingly, when I logged the contents of php_vars.ar_sl_fileExt – it was ‘
   png|jpg|jpeg|gif|webp’ – so it would seem to work – but doesn’t. When I roll 
   it back to the original hard coded string, it works fine.
 * Not sure a variable is allowed within the regular expression and may need to 
   be rolled back.
 *  Plugin Author [aknieriem](https://wordpress.org/support/users/aknieriem/)
 * (@aknieriem)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/additional-selectors-doesnt-work/#post-16851652)
 * Thanks for mention. I will take a look
 *  [Katie Ayres](https://wordpress.org/support/users/1happyplace/)
 * (@1happyplace)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/additional-selectors-doesnt-work/#post-16897513)
 * [@aknieriem](https://wordpress.org/support/users/aknieriem/) Have you gotten 
   a chance to look at this? I won’t be able to upgrade until this is resolved. 
   Much appreciated!
 *  Plugin Author [aknieriem](https://wordpress.org/support/users/aknieriem/)
 * (@aknieriem)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/additional-selectors-doesnt-work/#post-16997781)
 * Should be fixed in newest version. Please give it a try

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

The topic ‘Additional Selectors doesn’t work?’ is closed to new replies.

 * ![](https://ps.w.org/simplelightbox/assets/icon-256x256.png?rev=1261511)
 * [Simplelightbox](https://wordpress.org/plugins/simplelightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simplelightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simplelightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/simplelightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simplelightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simplelightbox/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [aknieriem](https://wordpress.org/support/users/aknieriem/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/additional-selectors-doesnt-work/#post-16997781)
 * Status: resolved