• Right, im attempting to make WP2 display a few list of links to posts from within a single post.

    Basicly what im trying to do is when you click on a news post it will display info about the author and links to his last 10 posts.


    <dl>
    <dt>Other Items Written By Author</dt>
    <?php
    $count = 0 ;
    $authorID = get_the_author_ID() ;
    $posts = get_posts('numberposts=100&&orderby=post_date');
    foreach ($posts as $post) : start_wp();
    if($post->post_author==$authorID && $count < "10"){
    echo "<dd><a href=\"";
    the_permalink();
    echo "\">";
    the_title();
    echo "</dd>";
    $count++;
    }
    endforeach; ?> </dl>

    That works fine on its own! But then also on the single page i need to also list the last 10 headlines for the latest posts aswell, now this is where it falls over i cant seem to use get_post twice, it doe’s not like it!

    Any ideas why?? I think i may need to reload the posts, but since the WP redesign ive not been able to use the Codex as the search functionality is just not there no more…

    Any ideas about how to get about this? or know the where abouts of the info on how to reload the post loop?

Viewing 1 replies (of 1 total)
  • Thread Starter Phunky

    (@phunky)

    Hmmmm it would seem using the above code effects functions such as get_the_author();

    This is bad :/ hmmm looks like ill just pull back the data with a custom $wpdb->query instead, will be a lot simpler as its only a list anyways!

Viewing 1 replies (of 1 total)
  • The topic ‘Displaying Multiple links to posts’ is closed to new replies.