Make WordPress Core

Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#10539 closed defect (bug) (invalid)

Comments Pagination Links disappear if you separate comments from pings

Reported by: aldolat Owned by: apeatling
Priority: normal Milestone:
Component: Comments Version: 2.9.1
Severity: normal Keywords: needs-patch
Cc: Focuses:

Description

If you try to separate the comments from pings (trackback and pinkbacks), the links to comments pagination (Previous and Next Comments) disappear if they are located after the call to wp_list_comments('type=pings') function.
For example, after this:

<ol class="commentlist">
<?php wp_list_comments('type=comment');?>
</ol>

paste:

<ol class="commentlist">
<?php wp_list_comments('type=pings'); ?>
</ol>

Now, you should not see the links to Previous and Next comments.

Instead, you should continue to see the links located before the wp_list_comments.

Change History (8)

#1 @aldolat
17 years ago

You may also try to copy

<div class="navigation">
	<?php previous_comments_link() ?>
	<?php next_comments_link() ?>
</div>

before AND after this piece of code:

<ol class="commentlist">
<?php wp_list_comments('type=pings'); ?>
</ol>

You'll see that only the first copy will display the links correctly.

#2 @aldolat
17 years ago

  • Cc aldolat@… added
  • Component General → Comments
  • Keywords 2nd-opinion added
  • Milestone Unassigned → 2.9.2
  • Version → 2.9.1

Can anyone test it?

#3 @nacin
17 years ago

  • Keywords needs-patch added; 2nd-opinion removed
  • Milestone 2.9.3 → 3.0

#4 @apeatling
16 years ago

  • Owner set to apeatling
  • Status new → assigned

#5 @apeatling
16 years ago

This is because the call to

<?php wp_list_comments('type=pings'); ?>

is resetting the internal commenting vars in wp_list_comments() which also resets pagination. The solution is to make sure you call the navigation links before you output pings to avoid the reset. I've tested this and it works.

#6 @apeatling
16 years ago

  • Cc apeatling added
  • Resolution → invalid
  • Status assigned → closed

#7 @nacin
16 years ago

  • Milestone 3.0

#8 @aldolat
16 years ago

@apeatling
You're right. Thanks. :)

Note: See TracTickets for help on using tickets.