Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#38208 closed defect (bug) (invalid)

Get total number of paged comments not working anymore

Reported by: y2kand13's profile y2kand13 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6.1
Component: Comments Keywords:
Focuses: Cc:

Description

The prescribed method of assessing the amount paged comments had been working for me...

get_comment_pages_count( $comments, $per_page, $threaded);

Since upgrading, the line returns a (1) no matter how many pages of comments a post may have???

Change History (6)

#1 @tristangemus
7 years ago

Running 4.6.1 as well - cannot replicate.

Cann you provide a screenshot of your discussion settings and tell us the theme you are using?

Also make sure that you are running the function after comments_template().

#2 @y2kand13
7 years ago

http://xpendium.com/wp-content/uploads/2016/10/Snap-2016-10-03-at-13.47.32-768x445.png

The theme is something I'm developing locally and is loosely based on the Twenty Thirteen theme. So I did test the statement on the default twenty thirteen theme with the same discussion settings and got the same results.

#3 @tristangemus
7 years ago

Okay, and I assume you have more than 25 approved comments on the specific post?

#4 @y2kand13
7 years ago

Yes I have 4 pages of comments on one particular test post.

#5 @y2kand13
7 years ago

  • Resolution set to invalid
  • Status changed from new to closed

I'll admit it, I might have ignored the remark about "Also make sure that you are running the function after comments_template()". It is where its always been and it used to work perfectly every time, that location is in the comments.php after the endif for the comment loop. I tried it in the single template and it works when placed after the call for the comment template, not before, which means I'm going to have to figure another way to do what I had been doing.

Sorry for crying wolf.

#6 @swissspidy
7 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.