WordPress.org

Forums

Categories Images
[resolved] exclude subcategories - no show (2 posts)

  1. xiscomax
    Member
    Posted 2 years ago #

    Thank you for this great plugin.

    now show in my theme categories using this code.

    <div id="categories">
    <?php foreach (get_categories() as $cat) : ?>
    <div class="imagencat">term_id); ?>"><img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>" /></div>
    <?php endforeach; ?>
    </div>

    but I would exclude not display sub-categories, there is a way to only show categories?

    thanks

    http://wordpress.org/extend/plugins/categories-images/

  2. Muhammad
    Member
    Plugin Author

    Posted 2 years ago #

    Yes you can do that.
    Please check get_categories() function at wordpress codecx here

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Categories Images
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic