Support » Fixing WordPress » Plugins Not Loading On Second Page

  • Hello. I have implemented a script on my website:

    That loads the next page underneath without having to reload the page. If you scroll to the bottom and click “LOAD MORE POSTS” this is the script I am reffering to. I will also paste the code below:

    <script type="text/javascript">
    // Ajax-fetching "Load more posts"
    $('.load_more_cont a').live('click', function(e) {
            $('.load_more_text a').html('Loading...');
    		type: "GET",
    		url: $(this).attr('href') + '#content',
    		dataType: "html",
    		success: function(out) {
    			result = $(out).find('#content_inside .featured_box');
    			nextlink = $(out).find('.load_more_cont a').attr('href');
    			//$('#boxes').append(result).masonry('appended', result);
    			//$('.fetch a').removeClass('loading').text('Load more posts');
                            $('.load_more_text a').html('Load More');
    			if (nextlink != undefined) {
    				$('.load_more_cont a').attr('href', nextlink);
    			} else {
                                    $('#content_inside').append('<div class="clear"></div>');
                                  	<?php get_header(); ?>                  
    				//  $('.load_more_cont').css('visibilty','hidden');
    /*                    if (nextlink != undefined) {
                            $.get(nextlink, function(data) {
                              if($(data + ":contains('featured_box')") != '') {
                                //alert('not found');
                                                              $('#content').append('<div class="clear"></div>');

    My Problem is, once the second page of posts has loaded, my plugins dont seem to work on that page. For example I have a plugin that makes all External links open in a new tab. It works on the first page fine, but as soon as i load the next it is no longer working. Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • It’s likely a JQuery conflict, unless you know how to resolve JQuery incompatability you may have to choose which plugin to keep.

    The standard troubleshoot is to deactivate all plugins (except the ine you’re testing of course) and reactivate one at a time to find the conflict.

    If you’re lucky, it could be one of the conflicting plugs just needs to be updated.

    Also a possability that sonething in the theme is causing the issue, You might activate the default (twentyeleven), or if that’s what you’re using get twentyten.

    A thought, may or may not be the issue, when you load content and insert it in to the DOM via AJAX the ready event isn’t re-fired, and the event handlers for the links may not be attached. This may be breaking the scripts on your dynamically loaded content.

    See and jQuery.on for more details.

    Thank you, I have solved the problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugins Not Loading On Second Page’ is closed to new replies.