h1How To: Display Text At End Of Post In Only Single View

Posted on December 2nd, 2007 at 6:54 PM (1 year, 1 month ago)

Ever wanted to display some text at the end of your post that would only show up on the single post view? Perhaps a message to commenters? Well, WordPress has the ability built in. No need for any plugins.

The trick is to use the <!--more--> tag. However, I bet you’re thinking “but I don’t want a ‘Read More’ link!”. Well, once again, WordPress to the rescue.

For a few major versions now, you can do custom more text. You simply format it like this: <!--more Check out the rest of my post!-->. Or, to remove the link altogether while still leaving the feature intact, just use a space: <!--more -->.

Here’s an example:

This is a cool post. It has lots of interesting stuff.

More interesting stuff.

<!--more -->

This text will only show up on the single post view.

You can check it out in action as the following text will only show up in single post view:

Hey there. This is the “special” text. :)

One Comment On This Post (Feed)

  1. I never knew about the custom “more” text. That’s a really neat trick.

Leave a Comment

If you would like to leave a trackback to this entry, use this URL. This is also a Gravatar enabled blog, so if you have a Gravatar account, use it!

 

Click Here to Quote Any Selected Text On The Page

XHTML: You can use these tags in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Discussion Elsewhere

#