WordPress.org

Ready to get started?Download WordPress

Forums

Excerpt vs. More Tag: What is Best in this Scenario (4 posts)

  1. Mr. MacIan
    Member
    Posted 6 years ago #

    This question is in regard to the recommended use of the <-- more --> tag. It is not a support question, as I know how the tag works; it is merely a question for suggested use by more experienced useres.

    I like to change the design of my blog fairly often. Previously I have displayed the full post of each blog entry on the blog home page. I find myself now wanting to show only a brief excerpt of each blog entry on the home page with a "Read More" link after each excerpt.

    I wonder what the best way to do this would be, especially taking into account that I may wish to change it back to displaying full blog posts at a future time. Should the_excerpt be used, the <-- more --> tag, or perhaps some other method?

    Also, I have not been using the <-- more --> tag in my posts. But I wonder if a person who might switch between showing full posts and excerpts on the home page might want to use the <-- more --> tag by default. If so, is there a way to have WP ignore the <-- more --> tag when you want to show the full post, and recognize the <-- more --> tag when you want WP to observe the content break?

  2. moshu
    Member
    Posted 6 years ago #

    Since using the "more" involves editing the content (the posts themselves) and not the templates... if you plan switching often between full post and excerpts - go witht the_excerpt: it is theme dependant and no editing of the content is required.

    Note: the_excerpt doesn't have a "read more" link, only the [...] displayed where it cuts the text.
    Workaround: use a plugin that let you add a lint to the single post view even with the excerpt.

  3. Mr. MacIan
    Member
    Posted 6 years ago #

    Thanks for the reply, moshu. That was my instinct. I have the "Advanced Excerpt" plugin that lets me control the excerpt's output to a very great degree. I've considered doing the following:

    <?php the_excerpt() ?><span><a href="<?php the_permalink() ?>">Read more >></a></span>

    Problem is that the excerpt is wrapped in a p tag, and the "Read More" link therefore renders to a separate line. Any advice on how to change it so that the Read More text displays on the same line as the excerpt (within the excerpt's p tags would be best, actually)?

  4. juliageek
    Member
    Posted 5 years ago #

    Hi
    I'm bumping this and wondering if anyone has come up with a solution to keeping the "Read More" within the closing p tag of the excerpt.

    I want to use the_excerpt instead of the_content because it is more flexible - some posts don't always start in a sexy enough way, and I'd like to pick the most exciting sentence or two. However, I'd like the read more link to follow on in the same way it does with the_content.

    I'm also a little interested as to why you can't customise the read more for the_excerpt like you can with the_content? I would have thought this was an obviously attractive function? What's the thinking behind it?

    I suppose the other option is to tell the post writers to make the opening para really tasty...

Topic Closed

This topic has been closed to new replies.

About this Topic