Forums

Recent Posts on WordPress Page (3 posts)

  1. magnavox
    Member
    Posted 3 years ago #

    Hello,

    I am creating a static page for my blog homepage.
    I have about 4 paragraphs, and under the 4 paragraphs I would like to display the 5 latest posts.

    I have added the following code below the text:

    <h2>Recent Posts</h2>
    <?php wp_get_archives('title_li=&type=postbypost&limit=5'); ?>

    Problem is when I save the page and preview it, all I see is "Recent Posts", but no recent posts under that. Am I doing something wrong? Is there some easier way to do this?

    Thanks!

  2. giggleberries
    Member
    Posted 3 years ago #

    Hi,

    I have the same question, as I also want to do this.

    have you managed to troubleshoot this Magnavox?

    Jimbob

  3. Technokinetics
    Member
    Posted 3 years ago #

    Try this:

    <h2>Recent Posts</h2>
    <ul>
    <?php wp_get_archives('type=postbypost&limit=5'); ?>
    </ul>

    - Tim

Topic Closed

This topic has been closed to new replies.

About this Topic