0
我有一个主题,我通过儿童主题进行编辑。我已经能够创建自定义页面模板,因为我想使用自定义页面添加特定帖子类型的分类信息。在wordpress中的自定义页面模板中显示分类信息
自定义页面具有下面的代码
<div id="primary" class="content-area col-sm-12 col-md-8 <?php echo of_get_option('site_layout'); ?>">
<main id="main" class="site-main" role="main">
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('content', 'page'); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if (comments_open() || '0' != get_comments_number()) :
comments_template();
endif;
?>
<?php endwhile; // end of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
我需要添加以下每条说明的分类信息。假设帖子类型的名称是食品,我如何向上面添加代码以显示每个帖子的分类(创建,大小,时间,类型)信息。
好的会尝试并恢复 –