In this session we show how to control the output of the excerpt in WordPress. You turn the excerpt feature on in the screen options. Then we show where in the post you can add custom excerpt text which can include HTML. If you don’t add a custom excerpt then the first block of text found on the page is displayed as the excerpt.
Member: I use another CMS and on it, I can create a summary for a post so that on the homepage, it will show some information that isn’t on the actual single page when you display the post.
Rick: Sure, that’s called an excerpt in WordPress and…
Member: Yeah but when I do the excerpt, it displays on the… it just takes the first part of the article, doesn’t it?
Rick: Well no, you have the ability to write your own excerpt. So let’s just say we go to this post right here and you just scroll down here towards the bottom some place. I guess we have to turn the excerpt on. Under screen options, excerpt. There you go, turn that on, scroll down to where it happens to be. Put your excerpt in, whatever you want and then this will display and it will not display the first… however many characters of this.
Member: I didn’t see that when I scrolled down. I guess I was in a hurry.
Rick: Well no, the thing is up here… sometimes, it’s hidden. So you have to go to Screen Options and open up Screen Options and check the excerpt box. And then yeah… because you can control all the meta boxes that show up on your page with this Screen Options thing. And the way the excerpt works is if there there is an excerpt here, it’ll use it. And this excerpt can actually contain HTML in it. If there’s…
Member: That’s what I wanted to ask you about.
Rick: If there’s content in this excerpt box then it takes the first block of stuff here… I don’t remember how many words it is but it’s you know, first 100 words or first 50 words or something like that.
Member: Yeah right.
Rick: And it will… and it strips out all the HTML. So for example, if you put an image in here…
Member: Yeah, the Screen Options is new to me so thank you for showing me that.
Rick: Well, there are some really important aspects of WordPress that are hidden behind Screen Options, not just what you just saw there. I think the thing I run into the most often is the menus. Over here in menus, Screen Options hides a bunch of stuff. So you could actually have posts, individual posts added or individual tags added. If you want to change the link target, you can set that up. If you want to specify specific css classes for each menu item, you can do that. If you want to set up a link relationship, you can do that and you can even set up a description. So all of these things are possible but you know, are hidden behind Screen Options. So there are lots of things like that.