How to post an abstract of the latest post to my front page (15 posts)

  1. websage
    Posted 11 years ago #

    Hello, I am working on this site:

    The WP blog is at:

    I would like to place in the right column of http://lawrencemmiller.com/ just below the photo of the author an automatically updated abstract of the latest blog post.

    How do I do that? Thanks in advance for your time! I love WP (although I am new to it) and I think I will move my MT sites to WP as well.

  2. Root
    Posted 11 years ago #

    I am only just beginning to get into this myself and cant give a precise answer. But I am thinking in terms of running the loop twice. First time round it will pick up something very similar to what you want. Second time round it will do the whole lot. For this type of high end dev you would be best consulting the awesome codex which is a treasure trove of useful info, very well written IMHO.
    and relatively simple to follow.

  3. ifelse
    Posted 11 years ago #

    This sounds like something that can be handled by Nick Momrick's recent posts plugin. The plugin takes in a number of parameters, two of which are the number of posts retrieved (1 i.e. the latest one) and whether or not you want a extract (abstract).

  4. Mark (podz)
    Support Maven
    Posted 11 years ago #

    I would use an rss function.

  5. Root
    Posted 11 years ago #

    Or a slug ? Excert thingy ?

  6. Jinsan
    Posted 11 years ago #

    This might be the thing you want:


    This supports a multitude of options including the following tags:

    %post_content% // Full content of the post
    %post_date% // Date for post
    %post_excerpt% // Excerpt for post
    %post_excerpt_short% // Customizably shorter excerpt, suitable for sidebar usage

    You could install the plugin, and then place the code in your page template to have it display on your front page. Alternatively install RunPHP and then copy the code into the page that way.

    Should do the job though. So if I understand you correctly, everytime there is a new post, you want that little bit wherever the code is to automatically update itself to provide an extract of the most recent post.

  7. websage
    Posted 11 years ago #

    OK, I did what you had suggested: I uploaded the plugin, activated it, and then pasted the following

      Recently Commented
      <?php c2c_get_recently_commented(3); ?>

    into my test page:


    See the error I get on the right-side column:

    Recent Posts
    Fatal error: Call to undefined function: c2c_get_recent_posts() in /home/lawre2/public_html/blog.php on line 103

    I am sure I am showing my total ignorance of PHP here but I would greatly appreciate anybody's help with this.

    Ideally, I would implement this code on the front page which currently is static HTML (I assume I will have to rename it into index.php).

    Thanks in advance!


  8. carthik
    Posted 11 years ago #

    I can offer some clues. I am sorry I can't try it out and tell you what absolutely works.

    Use the function query_posts (use http://www.cenamayo.com/wpxref to see how the function is written)

    Create a new query, something like
    $my_posts = query_posts();
    Then copy the loop over from the main loop, changing references to $posts with $my_posts , as needed.

  9. Kafkaesqui

    Posted 11 years ago #

    websage: make sure your page is WordPress-aware:


    And yes, it would need to be .php-ized.

  10. carthik
    Posted 11 years ago #

    <?php $myposts =


    foreach ($myposts as $mypost) :



    <li><?php the_excerpt(); ?></li>

    <?php endforeach; ?>

    Should work in the sidebar, after you do what Kaf suggested above.

  11. websage
    Posted 11 years ago #

    Thank you so much! This is starting to work:


    Now, how can I have just the excerpt of the latest entry posted on the front page?

    Thanks in advance!

  12. Joshua Sigar
    Posted 11 years ago #

    Have another block of code like right above your post, but instead set the numberposts to 1?

  13. websage
    Posted 11 years ago #

    Hmm, I did that but I do not get anything:


  14. Ana
    Posted 11 years ago #

    I would like to do a similar thing - I need the date of the last *posted* (not necessarily last modified) post on a WAP hoempage.

    For instance:
    My blog (last update 10/04)

    I had a look at the plugin, but couldn't work out if it was what I needed or not.

    Can anyone help?

  15. Ana
    Posted 11 years ago #


    I would give more information, but I don't know what else you need.

    If you let me know, I will provide it :)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.