我对编程很陌生,不知道该怎么做。下面的代码返回3个类别名称和功能图像,然后将它们输出到页面上。
<div id="footer">
<div id="footer-inside">
<div id="featured-categories-footer">
<?php
$featured_categories = array(8,9,10);
foreach ($featured_categories as $featured) {
if (get_option(THEME_PREFIX . \'enable_category_\' . $featured)) {
echo \'<!-- featured category #\'.$count.\' -->\';
$category_id = get_option(THEME_PREFIX . \'featured_category_\' . $featured);
query_posts("cat=$category_id&showposts=1"); if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="featured-category-footer">
<a href="<?php echo get_category_link($category_id); ?>" title="View all posts in <?php echo get_cat_name($category_id); ?>">
<?php the_post_thumbnail(); ?>
</a>
<h3><?php echo get_cat_name($category_id); ?></h3>
<?php echo category_description($category_id); ?>
</div>
<?php
endwhile; endif;
wp_reset_query();
}
}
?>
</div>
我想做的是,我想指向三个静态页面,而不是返回在管理区域中指定的3个类别。因此,它将返回这3个页面的功能图像以及名称。有人能帮忙吗?
我认为需要更改的行是“$featured\\u categories=数组(8,9,10);”而是指向页面。我走对了吗?