WordPress.org

Ready to get started?Download WordPress

Forums

How to set up the read more feature on posts? (7 posts)

  1. mixmastermichael
    Member
    Posted 2 years ago #

    Hi there,

    I have a blog set up, but I need to have it so that the post only displays something like a couple paragraphs and then the "read more" comes in at the end of the post where readers can go to the single post.

    Can someone please explain how I might be able to implement this into my posts?

    Thanks!

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    either
    use the 'more tag' when writing your posts, and the_content('read more'); in the template;
    or
    use the_excerpt(); in the template: http://codex.wordpress.org/Function_Reference/the_excerpt
    http://codex.wordpress.org/Function_Reference/the_excerpt#Make_the_.22read_more.22_link_to_the_post

  3. alex27
    Member
    Posted 2 years ago #

    Also, please note that if you decide to use the_excerpt(); by default there will be no 'more' link. However there's a way to achieve that - look in the first link provided by alchmyth.

  4. mixmastermichael
    Member
    Posted 2 years ago #

    Thanks for the replies guys, hmm - neither of those seem to be working though. The way my code is set up now, it looks like there is something that tries to have the "read more" feature set up but it doesn't work. Removing this code removes the .entry completely though...

    <?php the_content('Read the rest of this entry »'); ?>

    So I mean is there a way that this should be working otherwise?? Don't really know what is going on so that the "read this entry" part comes in.

    Any help would be greatly appreciated.

  5. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    Removing this code removes the .entry completely though...

    have you tried to replace the code with:

    <?php the_excerpt(); ?>

    also, should you be using the code in a page template, you need to apply:
    http://codex.wordpress.org/Customizing_the_Read_More#How_to_use_Read_More_in_Pages

  6. mixmastermichael
    Member
    Posted 2 years ago #

    Ah, getting closer, thanks for the reply. So, replacing that code with
    <?php the_excerpt(); ?>

    Condenses the code, and puts a [...] at the end, but it doesn't actually provide a link in there to the single post like I would like it too... any ideas how I can do that??

    Err, actually, putting that code above works, but I need the facebook and twitter stuff to show up on the posts on the blog page which it doesn't do when I use that code.

    oh, here's the URL - http://www.moko.com.php5-21.websitetestlink.com/?page_id=217

    Help please? Sort of driving me nuts and after I figure this out I am like 90% done with the site!

  7. mixmastermichael
    Member
    Posted 2 years ago #

    Nevermind guys, thanks for the help. Figured this out, should have read the first link more closely, had to paste that into the functions.php file.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.