Я пытаюсь сделать страницу сообщений на основе the example from wordpress codex. Я использую красивую тему WP (Radcliffe) и не имею успеха в объединении с указанным примером.Публикация на Wordpress сообщений
Страница, которую я создал, действительно, но сообщения перекрываются друг с другом. Внизу есть много свободного места и, в конце концов, нижний колонтитул в самом низу этой страницы.
Моя страница выглядит, что на данный момент:
<?php get_header(); ?>
<div class="content">
<?php
if (have_posts()) :
while (have_posts()) : the_post();
get_template_part('content', get_post_format());
wp_reset_postdata();
endwhile;
endif;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'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>
<?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>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<?php get_footer(); ?>
может кто-то пожалуйста, покажите мне мою ошибку?
Звучит как проблема css, а не проблема php. – rnevius
Так вы можете сказать, что мой код php, приведенный выше, не содержит ошибок? Я не орел в php. – anka