_gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();

Wordpress default theme article post handling replaced with Excerpts

by Beatle on June 8, 2009
in Blogging

Well I must say they don’t make it easy for people who don’t know PHP coding do they. I was able to work it out and I’m pretty sure with a little time and effort you would be able to, but why should you when I’ve just gone through it. The default home page is what I’m talking about.

The first posting I put up into Wordpress displayed the whole posting on the front page and every subsequent article was also posted in it’s entirety. I need to do the Excerpt that is so nicely provided right below the main article writing space. So I went a head and pasted the teaser or first paragraph in the excerpt area only to see no change. Now there’s a little hint below the excerpt box that tells you that “Excerpts are optional hand-crafted summaries of your content. You can use them in your template” and a handy link is provided through to the Template Tags/the excerpt page at wordpress.org.

Now I have done the coding thing when I was in my early twenties and not having been kept in this mind set I haven’t the inclination to learn php. But I worked it out from looking at the things presented on the Excerpt and Loop pages.

Basically you need to do the following steps:
1. In Wordpress admin go to the Appearance menu and select Themes. This will tell you which is your current theme (default in my case)
2. In the Appearance box select the Editor link and this will bring you to the Themes editor page with the RTL Stylesheet (rtl.css) page open
3. Of the pages listed on the Right Hand side of the Editor field select the Main Index Template (index.php) page
4. Scroll down to the 21st line that reads <!–p the_content(‘Read the rest of this entry &raquo;’);–> and replace it with <?php the_excerpt(); ?>

Voila! you now have a home page that automatically places an Excerpt of 55 characters of the posting instead of the whole article. If you want any different Excerpt to appear just simply place it in the Excerpt box and this will appear on the front page.

Hopefully you found this article useful and I look forward to writing more in the future.

Please leave comments whether constructive or not.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Live
  • LinkedIn
  • MySpace
  • Twitter

Share Your Thoughts

Security Code: