AJAX call wp_list_comments() in plugin
-
Hi,
I’m trying to use AJAX to update the comments list in a post. I want to return the generated HTML from wp_list_comments to Javascript so it can update the comments list. The AJAX call is called correctly, but my call always returns 0. Here’s the AJAX call:
public function ajaxRefresh() { global $post; wp_list_comments('callback=mytheme_comment&reverse_children=true'); exit(); } // function ajaxRefresh()
I also tried putting ob_start() and ob_clean() around it, but that has the same result.
Any suggestions?
Thanks in advance.
Cheers,
Marco
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘AJAX call wp_list_comments() in plugin’ is closed to new replies.