admin管理员组文章数量:1308420
Here is my code
<div class="our_team_box_big">
<h2>Microsoft</h2>
<?php foreach (get_the_category() as $cat) : ?>
<div class="one_fourth">
<div class="two_third"><img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" /></div>
<strong><?php echo $cat->cat_name; ?></strong>
</div>
<?php endforeach; ?>
</div>
z_taxonomy_image_url()
, is a category image plugin... Actually whats the my need is I am trying to access the all category images for a single post (i.e., I am craeting 5 categories and one post, how can I call all category images into that post?). I am using wordpress category image plugin
Here is my code
<div class="our_team_box_big">
<h2>Microsoft</h2>
<?php foreach (get_the_category() as $cat) : ?>
<div class="one_fourth">
<div class="two_third"><img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" /></div>
<strong><?php echo $cat->cat_name; ?></strong>
</div>
<?php endforeach; ?>
</div>
z_taxonomy_image_url()
, is a category image plugin... Actually whats the my need is I am trying to access the all category images for a single post (i.e., I am craeting 5 categories and one post, how can I call all category images into that post?). I am using wordpress category image plugin
1 Answer
Reset to default 0get_the_category()
isn't the correct function - you should be using get_categories()
per the dev documentation.
本文标签: categoriesHow to display all category images for single post in a page
版权声明:本文标题:categories - How to display all category images for single post in a page? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741843062a2400619.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
z_taxonomy_image_url()
function? – GhostToast Commented Jul 8, 2013 at 13:27