Use WordPress Excerpts to Create a Second Content Area

I am by no means a WordPress expert, but I do use it for this site and I have built a few custom themes for others. Recently I came across an interesting problem while creating the WordPress theme for Rose Edge LLC: I needed to have two separate content areas and WordPress only provides one. If you look at the design, I needed my client to be able to control the content in the “highlight box” (the green box at the top) and the “content area” (the blue box below). These could not be part of the same post info because of all the code that is in between them (which defines the visual break between the two. I didn’t want my client to have to insert code into the middle of every post. What to do?

It occurred to me that WordPress already has two ways to pull in content: The Post (called in your template with <?php the_content(); ?>) and The Excerpt (called in your template with <?php the_excerpt(); ?>). Since my client wasn’t using WordPress as a blog, but rather as a CMS, she wasn’t using The Excerpt at all. Could she use it instead as a secondary content area? Well, yes … but not without some plugins and modifications.


Originally I set up the “highlight box” to always contain the document title, like so:

<div id="highlight">
<h1><?php the_title(); ?></h1>

Next I had the brilliant idea of putting The Excerpt up in there too:

<div id="highlight">
<h1><?php the_title(); ?></h1>
<?php the_excerpt(); ?>

But the problem was …

The problem was that there was not always going to be information in the “hightlight box” that was additional to the title (see the More Resources page). If nothing was put into The Excerpt box when composing a post, WordPress would then show the Default Excerpt, which is just your post cut off after an arbitrary number of characters. As far as I could tell, there was not native way within WordPress to turn this off.

Enter the Excerpts Deluxe plugin

The Excerpts Deluxe plugin was made to allow you to choose after how many words or characters excerpts should cut off, and choose the cutoff character. But I used it for a different purpose. After installing the plugin go to Settings and you will see a new submenu, “Excerpts”. Simply enter “0” in box 1.

screenshot of options window

And now, if you don’t enter anything in The Excerpt box when composing a post, WordPress will not put anything where <?php the_excerpt(); ?> is called!

6 Responses to “Use WordPress Excerpts to Create a Second Content Area”

  • Kai Schaller Says:

    Very clever indeed. WordPress is a fairly complex piece of software, but the WP team has done a wonderful job keeping it easy to use and develop for.

    I actually wrote a WordPress plugin for a client a while back (which also served to fulfill my computer science capstone project) and it was surprisingly easy to learn how everything worked. I haven’t played around with the internals of WP since then, especially after Happy Cog gave it a makeover, but I imagine it’s even better in this latest iteration.

    I’m already enjoying these posts you’re putting together, and thank you for providing screenshots — including something visual really does make an entry better, IMHO.

  • ton Says:

    Thanks for the post, I have been having the same problems.

  • metro kurye Says:

    Good article. Thanks.

  • ygssinavlari Says:

    very good beautiful website

  • Pet Snakes Says:

    Love your writing style and the design of your blog, its very original! Well done, look forward to reading more.

  • Antonio Ardoin Says:

    Yo, nice blog, just wondering what spam software you use for comments because i get lots on my blog.