The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Plugin - multiple-content-blocks - Tip (1 post)

  1. hilmon
    Posted 5 years ago #

    I've been using the multiple-content-blocks plugin on my last few sites and I must say it's brilliant when creating CMS sites.

    I'm no guru but just a couple of things I had to figure out and thought I share....

    The plugin doesn't seem to work in page-loop.php (or at least not for me) so I use it in page.php (correct me if I'm wrong about this)

    To display a new content block on a page only if text exists in the block I use...

    <?php $text = get_the_block('text'); if ( $text != '') echo '<div id="text-box">' .$text. '</div>'; ?>

    Note 'text' is the name that will be given to the content block in the admin page edit page.


Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 5 years ago by hilmon
  • This topic is not a support question
  • WordPress version: 3.1.1