tags:

views:

37

answers:

2

I have a page with template No Sidebars I want to list 5 posts' titles on that page by author where the author's name = page's title

any idea how to do so without using any plugin?

I thought that query_posts function would do the trick but this important note kind of tells me that I cannot use query_posts

+1  A: 

Here's a bit of code that will probably get you the Post Titles by author; in order to have this automatically feed off of the page title I'd have your title generation code... Hope this helps you get at least part of the way there...

  <?php $my_query = new WP_Query('author_name=YourAuthor&showposts=5'); ?>
  <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
  <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
  <?php the_title(); ?></a><?php endwhile; ?>
poindexter
great, working nicely. Thank you.
Radek
+1  A: 

Check out Function Reference/WP Query « WordPress Codex and an earlier answer (with the same code :) as poindexter's) at http://stackoverflow.com/questions/2646767/wordpress-display-featured-posts-outside-of-loop

songdogtech