WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Add a Read More link (4 posts)

  1. Nith
    Member
    Posted 4 years ago #

    Hello,

    Currently I have code that pulls the latest blog post into my home page. The main content is pulled using the following code:

    <?php the_content(); ?>

    However, currently all of the post is displayed and I wish to limit the text that is displayed and them have a "Read More" link. I know I can achieve this by using the the_excerpt function but I would prefer it to be done automatically.

    Anyone know?
    Ty.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    You can:

    1. Opt for the simple automatic method using <?php the_excerpt();?>

    2. Use the <--more--> tag in your posts to create your summary manually.

    3. Use <?php the_excerpt();?> with a custom excerpt plugin.

    4. Use <?php the_excerpt();?> and add a hand-written excerpt to each post.

  3. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    that is the automatic way -
    using the_excerpt() instead the_content() .

    the manual way would be:
    either to write a manual excerpt below the post edit window;
    or to use the 'more' button while writing the post
    (and changing the_content('read more');).

  4. Nith
    Member
    Posted 4 years ago #

    Thanks all.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.