WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy Images
Help Please: How to omit description from list of taxonomies terms/im (2 posts)

  1. riasaurusrex
    Member
    Posted 4 years ago #

    Here's what I'm trying to achieve:

    I have a description for each of my custom taxonomy term as well as an image using the Taxonomy Images plugin. On the homepage I just want to list the terms + their images, but not the description (the part I'm having problems with). On the archive page for each term I'd like to list just the term name + description (this part I can figure out).

    Currently in my template file I have this:

    $cats = get_categories();
    foreach ( $cats as $c ) {
        $url = get_category_link( $c->term_id );
        $img = $taxonomy_images_plugin->get_image_html( 'fullsize', $c->term_taxonomy_id );
        if( !empty( $img ) )
            print '<a href="' . $url . '">' . $img . '</a>';
    }

    which lists the category name + image + description.

    Any help on how to keep the description from showing up would be greatly appreciated.

    Thanks.

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

  2. Michael Fields
    Themer
    Plugin Author

    Posted 4 years ago #

    Hmm, are you sure that this is the only code in your template file? This code should only generate linked images.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic