View Single Post
Old 02-27-2011, 02:03 PM  
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
you're over complicating things, just do this:

Code:
<?php if(get_post_meta($post->ID, 'author-comment', true)): ?>
<div style="somestyle"><?php echo get_post_meta($post->ID, 'author-comment', true); ?></div>
<?php endif; ?>
then just use a custom field named author-comment (or whatever) with the text you want and apply the style as you want.

Alternatively, if your theme doesn't use excerpts, then you can simply place the_excerpt() there, so you'll only need to add an excerpt to display that text, and if you don't input anything, then nothing will be displayed.
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote