我正在做一个非常简单的循环,在这个循环中,我需要用我的样式打印一个自定义的帖子类型(下面的脚本中还没有定义,但我在这里打印了\\u thime),并且它正在工作。问题是,在页面底部,就在页脚之前,“某物”正在打印我的帖子标题。
这就是功能:
function shortcode_eventi() {
query_posts(array(
\'post_type\' => \'eventi\'
) );
?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<small><?php the_time(\'F jS, Y\') ?></small>
<?php endwhile; ?>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center"><?php _e("Sorry, but you are looking for something that isn\'t here."); ?></p>
<?php endif; ?>
<?php
}
对这个问题一无所知。