[Plugin: Multiple content blocks] If MCB empty display default content
-
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
http://s13.postimage.org/ks0btwzwn/Capture.png
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 ?>
http://wordpress.org/extend/plugins/multiple-content-blocks/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Multiple content blocks] If MCB empty display default content’ is closed to new replies.