• Skip to content
  • Skip to primary sidebar

Paul Millard

Make Money Online

You are here: Home / wordpress / How to Add Read More to Post Excerpts

How to Add Read More to Post Excerpts

November 13, 2009 by Paul 3 Comments

I had noticed on other blogs that when viewing category pages with the post cut down to show excerpts that instead of the post excerpt ending in […] they were showing Read more.

This is how my post excerpts were being formatted

The LG 47SL9000 is one of the most technologically advanced HD TVs available on the market at the moment.
It offers a near-perfect marriage of form and function and if you can afford the premium that you will pay for the cutting edge technology then this LG LED TV should be a real consideration.
Slimline Panel for […]

This seems to be the default option in the Studiopress WordPress themes that I have been using so I popped along to the Studiopress help forum to see if any help was at hand.
As usual there was plenty but getting down to the nitty gritty would take a bit of research.

To start off with it seems that there is quick tag called more on the visual editor that I had never noticed before. A bit of a peruse over at WordPress Codex Customising the Read More and I was instantly enlightened.
But a bit more help was needed to get this properly implemented into my blogs.
I bit more searching over at Studiopress and I was ready to have go at editing my WordPress files.
This is what I did for the Studiopress Church Theme. I am pretty sure that it will work with the other themes.

Firstly open up the archive.php and look for this bit of code:

<?php the_excerpt(); ?>

and replace with

<?php the_content_limit(500, “”); ?>

This has the effect of making the post excerpts 500 characters long and it loses the […] from the end of the post.

Now to finish the job off I had to go to all my posts and insert the <!–more–> tag at the point where I wanted the excerpt to finish. This is easy to do using the more button in the HTML visual editor on the edit post page.

This is how the excerpt now looks complete with the Read More linking to the post page.

The LG 47SL9000 is one of the most technologically advanced HD TVs available on the market at the moment. It offers a near-perfect marriage of form and function and if you can afford the premium that you will pay for the cutting edge technology then this LG LED TV should be a real consideration. Slimline Panel for Easy Wall Mounting Read More →

Note:
Don’t forget to insert the <!–more–> tag in a post at a place before 500 characters. If you want longer excerpts just change the number to something higher in <?php the_content_limit(500, ""); ?>

Filed Under: wordpress Tagged With: excerpts, studiopress, wordpress

Reader Interactions

Comments

  1. Gizew says

    February 15, 2010 at 3:58 pm

    First of all I would like to thank you for this great fix.

    I have a bit taken your fix a bit one step ahead

    in archive.php

    change

    with

    // “Read more” can be any phrase of your choice.

    Then insert the tag in a post any where you like.

  2. ashutosh says

    December 25, 2011 at 3:39 am

    Thank you for this. Can you please tell me how can I add more style to read more button? Like hover color etc?

  3. Vipin says

    July 28, 2012 at 1:01 pm

    thanks paul for this..i have been using some ‘read more generator’ plugins lately but your post saved my alot of memory and load to my server..thanks.. 🙂

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

About Paul Millard

Over the last 15 years Paul Millard has built up a successful internet business assisting both online and offline companies in their web based marketing efforts. Read More…

ipage hosting
Disclosure: We are a professional review site that receives compensation from the companies whose products we review. We test each product thoroughly and give high marks to only the very best. We are independently owned and the opinions expressed here are our own.


livedrive cloud storage

Recent Posts

  • Social Control System Review
  • Future of Wealth Review
  • Optin Architect Review
  • List Building Using Facebook for Business Owners
  • The importance of customer support in hosting

Categories

  • affiliate marketing (6)
  • backlinking (1)
  • email marketing (1)
  • Infographics (1)
  • wordpress (5)
ipvanish

Return to top of page

Copyright © 2022 · Paul Millard