WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP-Paginate] Separation of Comments From Ping/Trackbacks (2 posts)

  1. b-rad
    Member
    Posted 4 years ago #

    Love your plugin but is there some way to pull out the ping/trackbacks so that they appear after all the paginated comments?

    http://wordpress.org/extend/plugins/wp-paginate/

  2. Eric Martin
    Member
    Posted 4 years ago #

    b-rad - Unfortunately, WP-Paginate is just responsible for creating the pagination links, not displaying the comments or posts.

    On my current site, I did something similar with:

    // get comment and trackback counts
    $comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $post->ID));
    $emm_comment_count = count($comments_by_type['comment']);
    $emm_trackback_count = count($comments_by_type['pings']);
    
    ...
    
    <ol>
    <?php wp_list_comments('type=comment&style=ol'); ?>
    </ol>
    
    ...
    
    <ol>
    <?php wp_list_comments('type=pings&style=ol'); ?>
    </ol>

    There is more code in between, like validation of counts and headers, etc., but the basic idea applies.

Topic Closed

This topic has been closed to new replies.

About this Topic