#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)
#2
@
17 years ago
- Cc added
- Component General → Comments
- Keywords 2nd-opinion added
- Milestone Unassigned → 2.9.2
- Version → 2.9.1
Can anyone test it?
#5
@
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
You may also try to copy
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.