WordPress.org

Forums

AJAX Comment Loading
[resolved] WP 3.8 + Genesis (3 posts)

  1. lzm_dev
    Member
    Posted 1 year ago #

    Strange, this isn't working with WP 3.8 + Genesis. Any idea why?

    https://wordpress.org/plugins/ajax-comment-loading/

  2. lzm_dev
    Member
    Posted 1 year ago #

    Does anybody have a clue how to make AJAX Comment Loading working with Genesis Framework?

  3. lzm_dev
    Member
    Posted 1 year ago #

    The great Genesis-Framework Support (Andrea) helped me out to find the issue:

    Change this:

    public function ajax_handler() {
                    global $post, $id, $cpage;
                    query_posts( array( 'p' => $_REQUEST['postid'] ) );
                    if ( have_posts() ) {
                            set_query_var( 'cpage', intval( $_REQUEST['cpage'] ) );
                            $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_REFERER'];
                            the_post();
                            comments_template();
                            exit();
                    }
                    exit( 0 );
            }

    to this in the plugin file:

    public function ajax_handler() {
                    global $post, $id, $cpage;
                    query_posts( array( 'p' => $_REQUEST['postid'] ) );
                    if ( have_posts() ) {
                            set_query_var( 'cpage', intval( $_REQUEST['cpage'] ) );
                            $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_REFERER'];
                            the_post();
                            comments_template('',true); //this line
                            exit();
                    }
                    exit( 0 );
            }

    It would be great if this enhancement find it's way into the next update for this plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • AJAX Comment Loading
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags