I am displaying some fallback content if no content has been placed into the Multiple Content Block on any particular page. This works fine, however, two editor textareas appear in the edit page in wordpress, see here
This will be down to how I am checking for content in the MCB and outputting based on that. Is there a better way that will also ensure only one textarea appears in wordpress?
<?php $rhs_block = get_the_block('Right-hand-side'); if ($rhs_block == "") : ?> <p>Fallback content if nothing is entering into the mcb in the editor</p> <?php else : echo $rhs_block; endif ?>
- The topic ‘[Plugin: Multiple content blocks] If MCB empty display default content’ is closed to new replies.