{"id":5462567,"date":"2014-11-08T15:52:26","date_gmt":"2014-11-08T15:52:26","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/posts-overlapped-and-white-space-below\/"},"modified":"2016-08-22T04:14:42","modified_gmt":"2016-08-22T04:14:42","slug":"posts-overlapped-and-white-space-below","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/posts-overlapped-and-white-space-below\/","title":{"rendered":"Posts overlapped and white space below"},"content":{"rendered":"<p>I&#8217;m trying to make a page of posts using the <a href=\"https:\/\/wordpress.org\/themes\/radcliffe\">Radcliffe<\/a> theme.<br \/>\nThe page is working, indeed, but not the way it should &#8211; 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.<\/p>\n<p>Could you please take a look at my php code and tell me if there is any mistake?<br \/>\nI&#8217;m combining my theme page with <a href=\"https:\/\/codex.wordpress.org\/Page_Templates#A_Page_of_Posts\">codex&#8217;s example of page of posts<\/a>.<\/p>\n<pre><code>&lt;?php get_header(); ?&gt;\n\n&lt;div class=&quot;content&quot;&gt;\n\n\t        &lt;?php\n        \/* The loop: the_post retrieves the content\n         * of the new Page you created to list the posts,\n         * e.g., an intro describing the posts shown listed on this Page..\n         *\/\n        if ( have_posts() ) :\n            while ( have_posts() ) : the_post();\n\n              \/\/ Display content of page\n              get_template_part( &#039;content&#039;, get_post_format() );\n              wp_reset_postdata();\n\n            endwhile;\n        endif;\n\n        $paged = (get_query_var(&#039;paged&#039;)) ? get_query_var(&#039;paged&#039;) : 1;\n\n        $args = array(\n            \/\/ Change these category SLUGS to suit your use.\n            &#039;category_name&#039; =&gt; &#039;testy&#039;,\n            &#039;paged&#039; =&gt; $paged\n        );\n\n        $list_of_posts = new WP_Query( $args );\n        ?&gt;\n        &lt;?php if ( $list_of_posts-&gt;have_posts() ) : ?&gt;\n\t\t\t&lt;?php \/* The loop *\/ ?&gt;\n\t\t\t&lt;?php while ( $list_of_posts-&gt;have_posts() ) : $list_of_posts-&gt;the_post(); ?&gt;\n\t\t\t\t&lt;?php \/\/ Display content of posts ?&gt;\n\t\t\t\t&lt;?php get_template_part( &#039;content&#039;, get_post_format() ); ?&gt;\n\t\t\t&lt;?php endwhile; ?&gt;\n\n\t\t&lt;div class=&quot;posts&quot;&gt;\n\n\t\t\t&lt;?php\n\t\t\t$paged = (get_query_var(&#039;paged&#039;)) ? get_query_var(&#039;paged&#039;) : 1;\n\t\t\t$total_post_count = wp_count_posts();\n\t\t\t$published_post_count = $total_post_count-&gt;publish;\n\t\t\t$total_pages = ceil( $published_post_count \/ $posts_per_page );\n\n\t\t\tif ( &quot;1&quot; &lt; $paged ) : ?&gt;\n\n\t\t\t\t&lt;div class=&quot;page-title section small-padding&quot;&gt;\n\n\t\t\t\t\t&lt;h4 class=&quot;section-inner&quot;&gt;&lt;?php printf( __(&#039;Page %s of %s&#039;, &#039;radcliffe&#039;), $paged, $wp_query-&gt;max_num_pages ); ?&gt;&lt;\/h4&gt;\n\n\t\t\t\t&lt;\/div&gt;\n\n\t\t\t\t&lt;div class=&quot;clear&quot;&gt;&lt;\/div&gt;\n\n\t\t\t&lt;?php endif; ?&gt;\n\n\t\t    \t&lt;?php while (have_posts()) : the_post(); ?&gt;\n\n\t\t\t\t\t&lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;\n\n\t\t\t    \t\t&lt;?php get_template_part( &#039;content&#039;, get_post_format() ); ?&gt;\n\n\t\t    \t\t&lt;\/div&gt; &lt;!-- \/post --&gt;\n\n\t\t        &lt;?php endwhile; ?&gt;\n\n\t\t\t&lt;?php if ( $wp_query-&gt;max_num_pages &gt; 1 ) : ?&gt;\n\n\t\t\t\t&lt;div class=&quot;archive-nav&quot;&gt;\n\n\t\t\t\t\t&lt;?php echo get_next_posts_link( &#039;\u00ab &#039; . __(&#039;Older posts&#039;, &#039;radcliffe&#039;)); ?&gt;\n\n\t\t\t\t\t&lt;?php echo get_previous_posts_link( __(&#039;Newer posts&#039;, &#039;radcliffe&#039;) . &#039; \u00bb&#039;); ?&gt;\n\n\t\t\t\t\t&lt;div class=&quot;clear&quot;&gt;&lt;\/div&gt;\n\n\t\t\t\t&lt;\/div&gt; &lt;!-- \/post-nav archive-nav --&gt;\n\n\t\t\t&lt;?php endif; ?&gt;\n\n\t\t&lt;?php endif; ?&gt;\n\n\t&lt;\/div&gt; &lt;!-- \/posts --&gt;\n\n&lt;\/div&gt; &lt;!-- \/content section-inner --&gt;\n\n&lt;?php get_footer(); ?&gt;<\/code><\/pre>\n<p>P.S. every post have a thumbnail and an image inside.<\/p>\n","protected":false},"template":"","class_list":["post-5462567","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5462567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5462567\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5462567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}