0

I am using has_block() to check if post has a specific block type but it does not see blocks inside another blocks, like columns block. So, how to make it find a gallery inside the column?

1 Answer 1

1

It should, because has_block( 'gallery' ) uses source strpos() to determine if the post content has the <!-- wp:gallery string.

1
  • Ok I asked wrong question. My problem is with rendering that gallery. I thought this is the issue but it is somewhere else...
    – MarkJ
    Sep 20, 2020 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.