Home Forums WTI Like Post PRO Not working in Ajax loaded items

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #106
    omegastudio
    Participant

    Hello.

    The plugin is not working for items added through ajax. Be be specific for BuddyPress activity items loaded with infinite scroll.

    #109
    Webtechideas
    Keymaster

    Can you please share the site url for us to check? You can also check by modifying the following line in wti_like_post.js file

    jQuery(".jlk").on("click", function(e){

    to

    jQuery(document).on("click", ".jlk", function(e){

    Thanks

    #229
    samrhein
    Participant

    I was receiving the error Fatal error: Call to undefined function GetWtiLikePost() when loading posts through AJAX. I was able to fix it by changing line 367 in wti_like_post.php to if (is_admin() && !( defined('DOING_AJAX') && DOING_AJAX )) {

    The problem is, calls from admin_ajax.php make all checks on is_admin() return true, so the other plugin files and scripts weren’t being included.

    #230
    samrhein
    Participant

    It also looks like line 2 of wti_like_post.js needs to be changed to jQuery("body").on("click", ".jlk", function(e){ to register click events for the AJAX loaded buttons

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘WTI Like Post PRO’ is closed to new topics and replies.