PHP Developers Network
http://forums.devnetwork.net/

Wordpress Pagination Links - how do I modify this?
http://forums.devnetwork.net/viewtopic.php?f=2&t=144184
Page 8 of 8

Author:  simonmlewis [ Tue Sep 19, 2017 5:32 am ]
Post subject:  Re: Wordpress Pagination Links - how do I modify this?

But why is it now doing that - if I switch it back to the previous function and file, it doesn't do it. Is something in there making them all appear when they shouldn't?

Author:  Celauran [ Tue Sep 19, 2017 5:34 am ]
Post subject:  Re: Wordpress Pagination Links - how do I modify this?

Apparently. You'd need to dig through the code and find where get_comments is being called, and with which arguments. You can pull those arguments up to your get_comments call if you like, or you can modify whatever function calls get_comments by default and pull all of our changes higher. Either way seems fine, but the latter is obviously going to be more work.

Author:  Celauran [ Tue Sep 19, 2017 5:39 am ]
Post subject:  Re: Wordpress Pagination Links - how do I modify this?

https://codex.wordpress.org/Function_Re ... t_comments

Looks like the status argument is what you're after.

Author:  simonmlewis [ Tue Sep 19, 2017 6:03 am ]
Post subject:  Re: Wordpress Pagination Links - how do I modify this?

I don't see that argument in the new code. What's puzzling me is why the 'NEW' code is "unlocking" the standard feature of showing only comments that are approved.

Author:  Celauran [ Tue Sep 19, 2017 6:10 am ]
Post subject:  Re: Wordpress Pagination Links - how do I modify this?


Author:  simonmlewis [ Tue Sep 19, 2017 6:27 am ]
Post subject:  Re: Wordpress Pagination Links - how do I modify this?

Adding it where....??

Author:  Celauran [ Tue Sep 19, 2017 7:59 am ]
Post subject:  Re: Wordpress Pagination Links - how do I modify this?

Do you see where post_id gets passed into get_comments? Just add another key/value pair to that array.

Author:  simonmlewis [ Tue Sep 19, 2017 8:14 am ]
Post subject:  Re: Wordpress Pagination Links - how do I modify this?

Syntax: [ Download ] [ Hide ]
$comments = get_comments(['post_id' => get_the_ID()] ['post_id' => get_the_ID()]);

Changing the last bit ??

Author:  Celauran [ Tue Sep 19, 2017 8:19 am ]
Post subject:  Re: Wordpress Pagination Links - how do I modify this?


Author:  simonmlewis [ Tue Sep 19, 2017 10:51 am ]
Post subject:  Re: Wordpress Pagination Links - how do I modify this?

Gotcha. Can you see why when they post the comment it now doesn't show their 'own' new comment waiting for moderation?
It use to do that as a way of saying "we have it, just needs moderating".
I'm sure it's something down in that function that at the moment shows only if it's live.

Page 8 of 8 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/