Next thing we’ll need to do is edit your theme’s files in order to integrate the_excerpt_reloaded. On your WordPress admin panel, click design, then theme editor. Then under “templates” click “Main Index Template” (or whatever the homepage for your theme is). You’ll then be presented with a whole load of code. Before you edit anything, you should always back up what anything you’re changing, so copy and paste your code into Notepad, or if you’re running Ubuntu, text editor will do the same job.
- The default setting, with the code just being
<php the_excerpt_reloaded(); ?>, on your page displayed will be 120 words of either your excerpt field or the first 120 words of the post. You can set the number of words to whatever you like, but here we can set it to 50 by putting 50 in the brackets:
<php the_excerpt_reloaded(50); ?>
- We can add more functions by putting a comma after the 50, so say you wanted to allow images to be shown, you’d put:
<php the_excerpt_reloaded(50,'<img>'); ?>
- Read On! You don’t have to have “more…” at the end of your excerpt – by adding in “TRUE, ‘Read on’” at the end of your excerpt, you can say “Read on”. So our excerpt now looks like this:
<?php the_excerpt_reloaded(50, '<img>', TRUE, 'Read on'); ?>
- Excerpt x2! On my site www.nometet.com, I’ve got two excerpts: a quote from an article and the first 200 words from the post. How do you do that? add in 2 to your excerpt, so our excerpt now looks like this:
<?php the_excerpt_reloaded(50, '<img>', TRUE, 'Read on', 2); ?>The 2 is telling WordPress to fake the excerpt as real content, so always displaying the first 50 words even if you’ve written something in the excerpt box.
So thats the basics covered. You can do even more with the_exerpt_reloaded! Check out the plugin homepage here for more info.
Oh, and its my first post here! I’m Alex Denning, WordPress power user, web design freelancer and editor of Nometet.com and GGG! I’d appreciate any feedback; have I pitched this too simply, or have I assumed you know too much? If you want to speak privately or are interested in having some web design work done, drop me an email: alex (at) nometet (dot) com.