WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. hilmon
    Member
    Posted 3 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.

    http://wordpress.org/extend/plugins/multiple-content-blocks

Topic Closed

This topic has been closed to new replies.

About this Topic

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