Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 特色图片未出现在博客页面的侧边栏中_Php_Wordpress - Fatal编程技术网

Php 特色图片未出现在博客页面的侧边栏中

Php 特色图片未出现在博客页面的侧边栏中,php,wordpress,Php,Wordpress,我正在处理的网站上的页面有问题。我在所有页面的侧边栏的一部分设置了特色图片,例如关于我们,我们做什么,等等,但是图片没有显示在博客帖子的页面上。以下是博客模板页面中的代码: <?php /** * Template Name: Blog page * * @package WordPress * @subpackage SPS */ ?> <?php get_header(); ?> <div id="firstSection"> <

我正在处理的网站上的页面有问题。我在所有页面的侧边栏的一部分设置了特色图片,例如关于我们,我们做什么,等等,但是图片没有显示在博客帖子的页面上。以下是博客模板页面中的代码:

<?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'); ?>&nbsp;<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
    <?php the_date('','',''); ?></a>&nbsp;<?php _e('by'); ?>&nbsp;<?php the_author(); ?>.&nbsp;
    <?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(); ?>
我是否忽略了代码中的某些内容,或者我是否走错了方向?任何帮助都将不胜感激

问候,,
Dalogi

在您发布的代码中,您没有在任何地方调用缩略图函数。我通常用“后”缩略图来做。您是否阅读过法典中关于这方面的内容: