Ajaxify WordPress Site(AWS)
[resolved] Display facebook comments section on AJAX loaded content (2 posts)

  1. Subharanjan
    Axelerant support
    Posted 3 years ago #

    Hi Manish, Thanks for such a nice plugin to make wordpress website AJAXified. I found a problem where Facebook Comments does not show up on AJAX loaded contents. So I have made a little change in the ajaxify.js file to call FB.XFBML.parse() function and the facebook comments now display fine. Let me know if this is Ok.

    // Ajax Request the Traditional Page
        url: url,
        success: function(data, textStatus, jqXHR){
            // Prepare
                $data = $(documentHtml(data)),
                $dataBody = $data.find('.document-body:first'),
                $dataContent = $dataBody.find(contentSelector).filter(':first'),
                $menuChildren, contentHtml, $scripts;
            //facebook comments
            var isFacebook = $data.find('.fb-comments');
            if(isFacebook != 'undefined' ) {
                var scriptText = 'FB.XFBML.parse();';
                var scriptNode = document.createElement('script');

    For more info visit my blog: http://www.subharanjan.in/loading-facebook-social-plugin-into-ajax-generated-dynamic-content-solved/


  2. manishkrag
    Plugin Author

    Posted 3 years ago #

    Thanks Subh :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Ajaxify WordPress Site(AWS)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic