• Hello,
    my problem is:
    in this site http://www.diegoechiara.it/itsfuntobehappy/blog I’m doing some tests to activate the infinite scroll.
    The first page displays all the posts correctly, but just go to the second page (and later) does not display some of the articles and the footer of the post shows only 2 buttons, instead of 4.

    Other information that might be useful: I am posted in the website is user-image articles. There are articles written by staff members and photos sent by users (you installed the BuddyPress plugin) that after the approval of the staff are published.

    My index in twentytwelve/index.php is:

    <?php
    get_header(); ?>
    <?php
    $args = array_merge( $wp_query->query_vars,
    	array(
    		'showposts' => '10000',
    		'tax_query' => array(
    				array(
    					'taxonomy' => 'publish_status',
    					'field' => 'slug',
    					'terms' => 'certified'
    				)
    		)
    	)
    );
    
    ?>
    <?php $query_post = query_posts( $args ); ?>
    <section id="primary" class="site-content">
    		<div id="content" role="main">
    
    		<?php if ( have_posts() ) : ?>
    			<?php
    			$count = 0;
    			/* Start the Loop */
    			$landscape_array = array();
    			$square_array = array();
    			$landscape_exclude = array();
    			$square_exclude = array();
    			while ( have_posts() ) : the_post();
    				$post_thumbnail_id = get_post_thumbnail_id();
    				$post_size = post_size($post_thumbnail_id);
    				if( $post_size == 'landscape' ):
    					$landscape_array[]= get_the_ID();
    				else:
    					$square_array[]= get_the_ID();
    				endif;
    			endwhile;
    
    			$i = 0;
    			$count = 0;
    			$adv = 0;
    			/* Start the Loop */
    			while ( have_posts() ) : the_post();
    				$id = get_the_ID();
    
    				$post_thumbnail_id = get_post_thumbnail_id();
    				$post_size = post_size($post_thumbnail_id);
    
    				if( $post_size == 'landscape' ):
    						$class = " landscape";
    						get_template_part( "content-image-userimage" );
    					$count++;
    					$adv++;
    					if ( $adv == 3 ):
    						echo adrotate_group(1);
    						$adv = 0;
    					endif;		
    
    				else:
    					if( in_array($id ,$square_array ) ):
    						$class = " square left";
    						get_template_part( "content-image-userimage" );
    						unset( $square_array[$i] );
    						$id_old = $id;
    						$i++;
    						if( $square_array[$i] ):
    						$id = $square_array[$i];
    						if( $id != $id_old ):
    						$class = " square right";
    						get_template_part( "content-image-userimage" );
    						unset( $square_array[$i] );
    						$i++;
    						endif;
    					endif;
    					echo "<div class=\"clear\"></div>";
    					$count++;
    					$adv++;
    					if ( $adv == 3 ):
    						echo adrotate_group(1);
    						$adv = 0;
    					endif;
    				endif;
    
    				endif;
    
    				/* Include the post format-specific template for the content. If you want to
    				 * this in a child theme then include a file called called content-___.php
    				 * (where ___ is the post format) and that will be used instead.
    				 */
    
    			endwhile;
    			?>
    
    		<?php else : ?>
    			<?php get_template_part( 'content', 'none' ); ?>
    		<?php endif; ?>
    
    		</div><!-- #content -->
    	</section><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Thanks

  • The topic ‘[Plugin: SlimJetpack ->Infinite-scroll] not working correctly’ is closed to new replies.