【发布时间】:2011-10-14 15:10:22
【问题描述】:
我正在处理的网站上的页面有问题。我在所有页面(即关于我们、我们做什么等)上将特色图片设置为侧边栏的一部分,但是该图片未显示在以博客文章为特色的页面上。以下是博客模板页面的代码:
<?php
/**
* Template Name: Blog page
*
* @package WordPress
* @subpackage SPS
*/
?>
<?php get_header(); ?>
<div id="firstSection">
<?php query_posts('post_type=post'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h1 class="blog-title"><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a></h1>
<div class="meta"><?php _e('Posted'); ?> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
<?php the_date('','',''); ?></a> <?php _e('by'); ?> <?php the_author(); ?>.
<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
<span class="edit-link"><?php edit_post_link(__('[Edit]')); ?></span>
</div>
<div>
<p class="blog-text"><?php the_excerpt(__('(more...)')); ?></p>
</div>
<?php endwhile; ?>
<?php else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
<?php posts_nav_link(); ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
我是否忽略了代码中的某些内容,或者我是否以错误的方式处理它?任何帮助将不胜感激。
问候, 达洛吉
【问题讨论】: