2 remove extraneous text, cleanup code examples
source | link

OK so this one should be very easy although I just can't find a solution to that. I have a website with many authors and posts. I need to create a list of all authors and for each one display his latest post (not posts, only one post) this.

This better explainexplains what I need:

<ul>
    <li>
        <h2>name of the author</h2>
        <a href="his latest post"> Title of his latest post </a>
    </li>
</ul>

This is the code I am using so far which works OK but it's only one loop. I need to create many of thisthese if I want to display all authors automatically:

    <ul>
    <?php
    query_posts('showposts=1&author=7'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post();
    ?>
        <li>
            <h2>name of the author</h2>
            <a href="his latest post"> Title of his latest post </a>
         </li>
    <?php
    endwhile; endif; 
    ?><>
</ul>

isIs there any simple way of doing it with only one loop?

Thanks

OK so this one should be very easy although I just can't find a solution to that. I have a website with many authors and posts. I need to create a list of all authors and for each one display his latest post (not posts, only one post) this better explain what I need:

<ul>
 <li>
 <h2>name of the author</h2>
 <a href="his latest post"> Title of his latest post </a>
 </li>
</ul>

This is the code I am using so far which works OK but it's only one loop. I need to create many of this if I want to display all authors automatically:

    <ul>
    <?php query_posts('showposts=1&author=7'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<li>
         <h2>name of the author</h2>
         <a href="his latest post"> Title of his latest post </a>
         </li>
    <?php endwhile; endif; ?></ul>

is there any simple way of doing it with only one loop?

Thanks

I have a website with many authors and posts. I need to create a list of all authors and for each one display his latest post (not posts, only one post).

This better explains what I need:

<ul>
    <li>
        <h2>name of the author</h2>
        <a href="his latest post"> Title of his latest post </a>
    </li>
</ul>

This is the code I am using so far which works OK but it's only one loop. I need to create many of these if I want to display all authors automatically:

<ul>
    <?php
    query_posts('showposts=1&author=7'); 
    if (have_posts()) : while (have_posts()) : the_post();
    ?>
        <li>
            <h2>name of the author</h2>
            <a href="his latest post"> Title of his latest post </a>
        </li>
    <?php
    endwhile; endif; 
    ?>
</ul>

Is there any simple way of doing it with only one loop?

1
source | link

Display all authors and their only one latest post

OK so this one should be very easy although I just can't find a solution to that. I have a website with many authors and posts. I need to create a list of all authors and for each one display his latest post (not posts, only one post) this better explain what I need:

<ul>
 <li>
 <h2>name of the author</h2>
 <a href="his latest post"> Title of his latest post </a>
 </li>
</ul>

This is the code I am using so far which works OK but it's only one loop. I need to create many of this if I want to display all authors automatically:

    <ul>
    <?php query_posts('showposts=1&author=7'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<li>
         <h2>name of the author</h2>
         <a href="his latest post"> Title of his latest post </a>
         </li>
    <?php endwhile; endif; ?></ul>

is there any simple way of doing it with only one loop?

Thanks