Title: not working, not sure why
Last modified: December 9, 2022

---

# not working, not sure why

 *  Resolved [Tyler Tork](https://wordpress.org/support/users/tylertork/)
 * (@tylertork)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/not-working-not-sure-why-3/)
 * There’s a screenshot on this page that’s has a media link, so it should use your
   lightbox behavior as I understand it, but when I click the image it just navigates
   tot he URL of the image. I see no trace of your plugin code on the page source.
   I don’t see a settings page for your plugin so there’s nothing to adjust. Turned
   off cache plugin for the moment to make sure that wasn’t the problem.
    WordPress
   6.1.1, latest Firefox browser.
    -  This topic was modified 3 years, 4 months ago by [Tyler Tork](https://wordpress.org/support/users/tylertork/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fnot-working-not-sure-why-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Johannes Kinast](https://wordpress.org/support/users/goaroundagain/)
 * (@goaroundagain)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/not-working-not-sure-why-3/#post-16281365)
 * Hi [@tylertork](https://wordpress.org/support/users/tylertork/),
 * could you add a Gallery to the post and try again?
 *  Thread Starter [Tyler Tork](https://wordpress.org/support/users/tylertork/)
 * (@tylertork)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/not-working-not-sure-why-3/#post-16281413)
 * If I add a Gallery, your lightbox effect works with both the Gallery and the 
   Image block.
    I assume this is for diagnosis, not because you’re going to recommend
   that I have a Gallery in every post.
 *  Plugin Author [Johannes Kinast](https://wordpress.org/support/users/goaroundagain/)
 * (@goaroundagain)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/not-working-not-sure-why-3/#post-16282244)
 * Hi [@tylertork](https://wordpress.org/support/users/tylertork/),
 * We use the `has_block( 'core/image' )` function provided by WordPress to check
   if there is an Image Block in the post: [https://github.com/goaround/gallery-block-lightbox/blob/1cd22b08c6d70c11f3855d660795866b10365a25/gallery-block-lightbox.php#L50](https://github.com/goaround/gallery-block-lightbox/blob/1cd22b08c6d70c11f3855d660795866b10365a25/gallery-block-lightbox.php#L50)
   For whatever reason, it fails on your post.
 * The Image Block is right in the post, not in a reusable post, right?
 * Can you place the image right at the end of the post and not inside the Genesis
   Blocks? Probably it’s too deep, but the `has_block` function is pretty simple.
 *  Thread Starter [Tyler Tork](https://wordpress.org/support/users/tylertork/)
 * (@tylertork)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/not-working-not-sure-why-3/#post-16283575)
 * It is in a reusable block, in fact.
 *  Plugin Author [Johannes Kinast](https://wordpress.org/support/users/goaroundagain/)
 * (@goaroundagain)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/not-working-not-sure-why-3/#post-16284114)
 * The problem is that `has_block` does not check reusable blocks inside a post:
   [https://github.com/WordPress/gutenberg/issues/18272](https://github.com/WordPress/gutenberg/issues/18272)
   
   There is a workaround, but it triggers a complete `parse_blocks` for each check.
   Currently, that would result in 9 calls to `parse_blocks`. I think that’s too
   expensive for a simple check if a script/style should be loaded or not.
 * You could implement the check inside a reusable block for your site with the 
   filter `baguettebox_enqueue_assets`: [https://wordpress.org/plugins/gallery-block-lightbox/#how%20to%20enqueue%20the%20necessary%20assets%20%28script%20%26%20style%29%20for%20blocks%20outside%20of%20posts%20or%20for%20block%20types%20that%20are%20not%20supported%20by%20default%3F](https://wordpress.org/plugins/gallery-block-lightbox/#how%20to%20enqueue%20the%20necessary%20assets%20%28script%20%26%20style%29%20for%20blocks%20outside%20of%20posts%20or%20for%20block%20types%20that%20are%20not%20supported%20by%20default%3F)
   and this function: [https://github.com/WordPress/gutenberg/issues/18272#issuecomment-566179633](https://github.com/WordPress/gutenberg/issues/18272#issuecomment-566179633)

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

The topic ‘not working, not sure why’ is closed to new replies.

 * ![](https://ps.w.org/gallery-block-lightbox/assets/icon.svg?rev=2788519)
 * [Lightbox for Gallery & Image Block](https://wordpress.org/plugins/gallery-block-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gallery-block-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gallery-block-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/gallery-block-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gallery-block-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gallery-block-lightbox/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Johannes Kinast](https://wordpress.org/support/users/goaroundagain/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/not-working-not-sure-why-3/#post-16284114)
 * Status: resolved