336 reputation
620
bio website
location
age
visits member for 3 years, 11 months
seen Sep 24 '12 at 10:26

Nov
29
comment Prevent WordPress from loading comments
well it's pretty much the same as the default function: pastebin.com/DuEkCZDv if you call it with ajax = true it will get only 10 comments, otherwise it will run the sql which gets all the comments...
Nov
29
accepted Prevent WordPress from loading comments
Nov
29
comment Prevent WordPress from loading comments
Even more weird is if I use the same sql query as WP does, but append add "LIMIT 10" to it. query count increases by 10...
Nov
29
comment Prevent WordPress from loading comments
ok. I ran into something weird :) If I replace WP's sql query with my get_comments() function I get 10 extra database queries reported, but less memory usage. For eg. for a post with 5000 comments, memory usage is 32 MB vs 16 MB. I don't understand how can WordPress make less database queries by selecting 5000 comments than me using get_comments() to pull out only 10 comments....
Nov
28
revised Fastest way to get the comment and ping total count for a post
added 66 characters in body
Nov
28
comment Getting $comments outside the comment template
what's the difference between using admin-ajax.php and usual site url?
Nov
28
accepted Getting $comments outside the comment template
Nov
28
asked Fastest way to get the comment and ping total count for a post
Nov
28
comment Prevent WordPress from loading comments
thanks, I'll just override that template
Nov
27
revised Prevent WordPress from loading comments
added 242 characters in body
Nov
27
comment Getting $comments outside the comment template
yes, I've come down to using get_comments() after all. The inconvenient is that now I have to use it on the first page load too, not only on the ajax call...
Nov
27
asked Prevent WordPress from loading comments
Nov
27
comment Getting $comments outside the comment template
yes, more comments should be retrieved and appended when a link is pressed.
Nov
27
revised Getting $comments outside the comment template
added 1 characters in body
Nov
27
revised Getting $comments outside the comment template
added 38 characters in body
Nov
27
asked Getting $comments outside the comment template
Nov
26
comment WP_Query with the “offset” argument
that's it. thank you :)
Nov
26
accepted WP_Query with the “offset” argument
Nov
26
asked WP_Query with the “offset” argument
Nov
25
accepted Basic gallery plugin suggestion