WordPress.org

Ready to get started?Download WordPress

Forums

Adding "Recent Posts" menu? (7 posts)

  1. Anonymous
    Unregistered
    Posted 9 years ago #

    How do I create a menu like you see here:
    http://www.hdpixel.com/blog/index.php
    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
    Member
    Posted 9 years ago #

    <?php get_recent_posts(); ?>

  3. Anonymous
    Unregistered
    Posted 9 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(); ?>
      Thanks

  4. atease
    Member
    Posted 9 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 9 years ago #

    atease - follow the guide I wrote for static pages and the code will work.
    http://www.tamba2.org.uk/wordpress

  6. atease
    Member
    Posted 9 years ago #

    thanks! that surely helped

  7. justkristin
    Member
    Posted 9 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

Tags