PLEASE HELP!! AJAX page navigation broken WEBSITE LINK AVAILABLE

Viewing 2 posts - 1 through 2 (of 2 total)
  • #16302
    jnette3
    Participant

    Hi,

    Among posts navigation options (Infinite Scroll, Static Links, AJAX Links) AJAX Links is broken on my site. This is my site: http://whisperofheart.lafsdesign.com/
    When I click “Load more posts,” the posts appear in weird places behind the other posts above.
    Please help me fix it.. :'(
    Thank you so much in advance,

    Jeanette

    • This topic was modified 10 years, 7 months ago by jnette3.
    • This topic was modified 10 years, 7 months ago by jnette3.
    #16305
    jnette3
    Participant
    			<?php if( ( ! is_singular() && ! is_paged() ) || ( ( is_page_template( 'template-blog.php' ) || is_page_template( 'template-blog-full-width.php' ) || is_page_template( 'template-blog-four-col.php' ) || is_page_template( 'template-blog-left-sidebar.php' ) || is_page_template( 'template-blog-no-sidebars.php' ) || is_page_template( 'template-blog-no-sidebars.php' ) || is_page_template( 'template-portfolio.php' ) || is_page_template( 'template-portfolio-right-sidebar.php' ) || is_page_template( 'template-portfolio-four-col.php' ) || is_page_template( 'template-portfolio-left-sidebar.php' ) || is_page_template( 'template-portfolio-no-sidebars.php' ) ) && ! is_paged() ) ) : ?>
    				<?php if( 'ajax' == wptheme_get_option( 'posts_nav' ) ) : ?>
    					var nav_link = $('#posts-nav .nav-all a');
    					if(!nav_link.length)
    						var nav_link = $('#posts-nav .nav-next a');
    					if(nav_link.length) {
    						nav_link.addClass('ajax-load');
    						nav_link.html('Load more posts');
    						nav_link.click(function() {
    							var href = $(this).attr('href');
    							nav_link.html('<img src="<?php echo get_template_directory_uri(); ?>/images/loading.gif" style="float: none; vertical-align: middle;" /> Loading more posts …');
    							$.get(href, function(data) {
    								var helper = document.createElement('div');
    								helper = $(helper);
    								helper.html(data);
    								var content = $('#content .entries', helper);
    								$('.entries').append(content.html());
    								var nav_url = $('#posts-nav .nav-next a', helper).attr('href');
    								if(typeof nav_url !== 'undefined') {
    									nav_link.attr('href', nav_url);
    									nav_link.html('Load more posts');
    								} else {
    									$('#posts-nav').html('<span class="ajax-load">There are no more posts to display.</span>');
    								}
    							});
    							return false;
    						});
    					}

    This is from my function.php

    Anyone? :'(

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.