我的基本wordpress主题的博客模板一直存在问题。 问题在于页脚&侧栏仍然以某种方式包含在容器div中。我现在已经无数次地完成了代码,我只是看不出问题是什么,所有结束标记都在正确的位置,但它仍然存在问题。
我创建的网站是dev.pearlofbeauty.co.uk/blog
我用于博客模板的代码:
<div class="container">
<div class="column_680 m_bottom_20">
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'orderby' => 'date',
'order' => 'DESC',
'paged' => $paged
);
query_posts($args);
while ( have_posts() ) : the_post();
?>
<div class="column_210 m_top_55">
<a href="<?php echo get_permalink(); ?>" class="blog_post_title"><?php the_title(); ?></a>
<p class="blog_info">
Date: <span><?php the_time('F d,') ?></span> <span><?php the_time('Y') ?></span><br />
Author: <span><?php echo the_author_meta('nickname', get_the_author_meta( 'ID' ) ); ?></span><br />
Comments: <span><?php comments_number() ?></span><br />
Categories: <span><?php the_category(', '); ?></span>
</p>
</div><!--end column_210-->
<div class="column_440 m_top_65 last">
<?php if( has_post_thumbnail() ){ the_post_thumbnail('blog'); }else{ ?>
<img src="<?php echo get_template_directory_uri(); ?>/images/blank-blog.png">
<?php } ?>
</div><!--end column_440-->
<div class="clear"></div>
<div class="post_content m_top_15">
<p><?php content('50') ?></p>
<a class="button read_more rounded" href="<?php echo get_permalink(); ?>">Read More</a>
</div>
<div class="clear"></div>
<?php endwhile; ?>
<div class="more_post m_top_15 m_bottom_185">
<?php echo pagination(); ?>
</div>
</div><!--end column_680-->
<!--sidebar-->
<?php get_sidebar(); ?>
<!-- End Sidebar -->
<div class="clear"></div>
</div><!--end container-->
<div class="clear"></div>
<?php get_footer(); ?>
答案 0 :(得分:1)
问题是
的结果<p><?php content('50') ?></p>
这部分返回:
<h4 style="font-style: italic; color: #000000;">
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
</h4>
<h5 style="color: #000000;">
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
</h5>
<div style="color: #000000;">
<div class="lc">
<h2 class="what"></h2>
<strong>Lorem Ipsum</strong> is simply dummy text of.
正如您所看到的,您错过了2个关闭div标签。