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

Share Improve this question edited Sep 21, 2015 at 5:01 tfrommen 9,2317 gold badges40 silver badges59 bronze badges asked Jul 8, 2013 at 12:26 sivasiva 11 silver badge1 bronze badge 1
  • 1 Can you expand a bit on what it is exactly you're trying to accomplish? What is z_taxonomy_image_url() function? – GhostToast Commented Jul 8, 2013 at 13:27
Add a comment  | 

1 Answer 1

Reset to default 0

get_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