has_block() not working as expected
-
I have been using the following to load default content when the_block() is empty:
if (has_block('cta 1')) { the_block('cta 1'); } else { echo "We'll load default content then"); }
This was working fine until recently when it appears that has_block() returns true even with an empty block so the default is not loaded.
I have updated everything to the latest and greatest but still get no content.
Any ideas much appreciated.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘has_block() not working as expected’ is closed to new replies.