Posts overlapped and white space below
-
I’m trying to make a page of posts using the Radcliffe theme.
The page is working, indeed, but not the way it should – the posts are overlapping, one on another, so I see every one of my six posts overlapped in the same place, below a lot of white space and, in the end, a footer.Could you please take a look at my php code and tell me if there is any mistake?
I’m combining my theme page with codex’s example of page of posts.<?php get_header(); ?> <div class="content"> <?php /* The loop: the_post retrieves the content * of the new Page you created to list the posts, * e.g., an intro describing the posts shown listed on this Page.. */ if ( have_posts() ) : while ( have_posts() ) : the_post(); // Display content of page get_template_part( 'content', get_post_format() ); wp_reset_postdata(); endwhile; endif; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( // Change these category SLUGS to suit your use. 'category_name' => 'testy', 'paged' => $paged ); $list_of_posts = new WP_Query( $args ); ?> <?php if ( $list_of_posts->have_posts() ) : ?> <?php /* The loop */ ?> <?php while ( $list_of_posts->have_posts() ) : $list_of_posts->the_post(); ?> <?php // Display content of posts ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <div class="posts"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $total_post_count = wp_count_posts(); $published_post_count = $total_post_count->publish; $total_pages = ceil( $published_post_count / $posts_per_page ); if ( "1" < $paged ) : ?> <div class="page-title section small-padding"> <h4 class="section-inner"><?php printf( __('Page %s of %s', 'radcliffe'), $paged, $wp_query->max_num_pages ); ?></h4> </div> <div class="clear"></div> <?php endif; ?> <?php while (have_posts()) : the_post(); ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php get_template_part( 'content', get_post_format() ); ?> </div> <!-- /post --> <?php endwhile; ?> <?php if ( $wp_query->max_num_pages > 1 ) : ?> <div class="archive-nav"> <?php echo get_next_posts_link( '? ' . __('Older posts', 'radcliffe')); ?> <?php echo get_previous_posts_link( __('Newer posts', 'radcliffe') . ' ?'); ?> <div class="clear"></div> </div> <!-- /post-nav archive-nav --> <?php endif; ?> <?php endif; ?> </div> <!-- /posts --> </div> <!-- /content section-inner --> <?php get_footer(); ?>
P.S. every post have a thumbnail and an image inside.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Posts overlapped and white space below’ is closed to new replies.