Forums

Pagination issue when Trackbacks & Comments are seperated (1 post)

  1. Harish Chouhan
    Member
    Posted 9 months ago #

    Hello,

    I have trackbacks and comments separate in my theme.

    • For testing as per WordPress Theme review, I have set comment pagination with only 5 comments being displayed on each page.
    • For a post on which I have 2 trackbacks and 18 comments, on the first page, the 2 trackbacks are shown and 3 comments are shown
    • On subsequent pages, no trackbacks are shown and 5 comments are shown on each page

    Issue is:
    From the 2nd paginated pages onward, no trackbacks are shown but the heading "Trackback" is still displayed.
    I use this code to display the pings:

    /* Display Pings -------------------------------------------------------------*/
                if ( ! empty($comments_by_type['pings']) ) : // if there are pings ?>
    
                       <h3 class="pings-title"><?php _e('Trackbacks for this post', 'dreamsonline') ?></h3>
    
                        <ol class="pinglist">
                            <?php wp_list_comments( 'type=pings&callback=dreamsonline_list_pings' ); ?>
                        </ol>
    
                <?php endif; // end pings

    Is there a way, to make sure:

    1. remove the trackback heading from the 2nd page onwards
    2. Or keep trackback out of the pagination, so that on the main post page, 5 comments are shown and all the trackbacks?

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 9 months ago by Harish Chouhan
  • This topic is not resolved
  • WordPress version: 3.4.1