Wordpress Php in page

Hi, I want to put a list of Recent Posts in my word press page. I have installed the Exec-PHP plugin and have made a page the home page as seen here http://highendguitars.info/

Now I want to put below the opening intro content things like recent posts.

How would I do this?

You can see that “Recent Posts” are showing as a widget in the sidebar but I want to put them in the page instead.

ok, I will bookmark this thread and come back to it later when I go ahead with this. Thanks very much!

The Codex will come in very handy with all the things you’d like to customize. It’s a bit much at first, but once you know your way through, it’ll be a lifesaver. :slight_smile:

For what you describe, you’ll be wanting to take advantage of WordPress’ Template Tags.

To retrieve the archive, you can use wp_get_archives, [URL=“http://codex.wordpress.org/Template_Tags/wp_list_categories”]wp_list_categories for categories, and [URL=“http://codex.wordpress.org/Template_Tags/wp_list_pages”]wp_list_pages for pages.

When you log in to your wp-admin page you will see ‘Pages’ in the left hand menu. You can create new pages from there. A Page will appear independently of your blog posts, and will automatically be listed in the nav menu of your blog’s home page.

Sorry, I can’t help with Categories or Archives… and I thought that Links was put there by default. (I know I had to get rid of WP’s automatic Links page on the WP site am doing for my OH, because she wanted a static Liks page of her own :wink:

hth

Hey that worked great thanks. I had to edit the clean up the code in DW first though as the forum changed it but after that it now works fine.

Thanks for the other alternative but I went with kohoutek’s code.

Can anyone tell me how I can also add other things to the pages like this is required? Things like a list of Categories, Archives, Links, Pages etc?

Or you can use the following plugin for displaying most recent posts.

From the codex:

<ul>
  <li>
    <h2>Recent Posts</h2>
    <ul>
    <?php
      $number_recents_posts = 5;//Can be how much you want
      $recent_posts = wp_get_recent_posts( $number_recents_posts );
      foreach($recent_posts as $post){
        echo '<li><a href="' . get_permalink($post["ID"]) . '" title="Look '.$post["post_title"].'" >' .   $post["post_title"].'</a> </li> ';
      } ?>
    </ul>
  </li>
</ul>

Edit as needed, of course. You’ll need to make your edits in page.php, or whatever page it is you want to have this function.

any ideas?