Support » Theme: Sampression Lite » How to Make all Post Show

  • Resolved sylvajohnson

    (@sylvajohnson)



    I’m using Sampression for my wedding registry (more of a wishlist and idea list). I don’t want to limit the amount of posts that show on the “latest posts” page. How can I make it pull every single post so you can keep scrolling instead of hunting for the tiny “Show Older Posts” button?

    wishlist.sylvandlujia.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • I would also like to do this for http://making-time.net/

    also hoping to figure this out. some of my posts are not showing. idk where to put them or how to make them show up otherwise

    Theme Author Sampression

    (@sampression)

    Please replace following code in index.php file

    // Exclude Sticky Posts and show remaining normal posts
    	$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    	query_posts( array(
    		'post__not_in' => get_option( 'sticky_posts' ),
    		'paged' => $paged
    		) );
    
    		while (have_posts()) : the_post();
    		get_template_part( 'loop', 'index' );
    
    		endwhile;
    
    		?>
    
         </div>
      <!-- #post-listing -->
      <?php
    	  sampression_content_nav( 'nav-below' );
    	  else:
    	?>

    by

    // Exclude Sticky Posts and show remaining normal posts
    	$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
        if(is_home()){
            $count_posts = wp_count_posts();
            $published_posts = $count_posts->publish;
            $args = array('posts_per_page'=>$published_posts, 'post__not_in' => get_option( 'sticky_posts' ));
    
        }else{
           $args = array(
                'post__not_in' => get_option( 'sticky_posts' ),
                'paged' => $paged
            );
        }
       $posts = get_posts($args);
        foreach ( $posts as $post ) : setup_postdata( $post );
    		get_template_part( 'loop', 'index' );
    
    		endforeach;
            wp_reset_postdata();
    	?>
    
         </div>
      <!-- #post-listing -->
      <?php
          if(!is_home()):
              sampression_content_nav( 'nav-below' );
          endif;
    	  else:
    	?>

    Hope this is what you are looking for.

    Thanks,
    Sampression Support Team

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to Make all Post Show’ is closed to new replies.