WordPress.org

Support

Support » How-To and Troubleshooting » How to modify author archive to show all posts and comments on one long page?

How to modify author archive to show all posts and comments on one long page?

  • Background: A blog with 4 authors (running WP 1.5.x & Relaxation theme).

    The current author archive looks like this: http://arild.paraply.org/arkiv/author/gisle/
    I would like to modify the template to show all the posts (in fulltext) and all the comments to the posts as one really long page. I know this should be pretty easy, but I`m lost in the template-tags right now.. Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You’d have to do some medium tweaking to get this to go. First, The Loop would need to be initialized (i.e. the following code placed before or above it) like so:

    <?php
    query_posts('posts_per_page=-1');
    $wp_query->is_single = true;
    ?>

    For comments you could insert a call to:

    <?php comments_template(); ?>

    To avoid the comment form and display only the comments, you’ll need add in a customized version of the comments loop in the author template. You can copy that from your (or the default) theme’s comments.php.

    Thanks Josef K. I`ll try it when I get back home. I will have to figure out how to make a function call to the modified comments template – but it should be doable.

    Thanks Josef K.

    ?

    Just call me Kaf.

    If you set up a modified comments template for your theme, let’s say comments-author.php, then to include it just use:

    <?php include(TEMPLATEPATH . '/comments-author.php'); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to modify author archive to show all posts and comments on one long page?’ is closed to new replies.