Adding "Recent Posts" menu? (7 posts)

  1. Anonymous
    Posted 11 years ago #

    How do I create a menu like you see here:
    He has a "Recent Posts" Menu that allows users to click to 5-6 of his most recent posts.
    How would I go about doing this?
    Thank you

  2. NickToye
    Posted 11 years ago #

    <?php get_recent_posts(); ?>

  3. Anonymous
    Posted 11 years ago #

    Where would I put that code? In the index.php file, correct?
    I want the "recent posts" to appear above my categories...so how would I place the code to do this?
    Here is the code from the php file for the menu:
    <div id="menu">

      <li id="categories"><?php _e('Categories:'); ?>

        <?php wp_list_cats(); ?>

      <?php get_links_list(); ?>

      Where would I place <?php get_recent_posts(); ?>

  4. atease
    Posted 11 years ago #

    alright, but does anyone know how i get those recent posts on a non-wp page? (i've searched the support forums and can't find it or it doesn't seem to work)

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

    atease - follow the guide I wrote for static pages and the code will work.

  6. atease
    Posted 11 years ago #

    thanks! that surely helped

  7. justkristin
    Posted 11 years ago #

    I have been trying to figure out how to add options (specifically, how to get recent posts offset by 20 - the number already displayed on my index page) to the get_recent_posts() function in the latest CVS download versions... I tried using the syntax from the get_recent_posts plugin, but it did not work. The plugin did not work either, perhaps because it conflicts with the wp_get_recent_posts in xmlrpc.php? Thank anyone who can help....

Topic Closed

This topic has been closed to new replies.

About this Topic