WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy Images
Remove links from images (4 posts)

  1. MichelleLeslie
    Member
    Posted 1 year ago #

    This plugin is awesome. I'm using it to show colours associated with a post.

    One thing I can't figure out is how to remove the links to the taxonomy archives from the taxonomy images (they're not required at this stage).

    The code I'm using to call the taxonomy images in my template is:

    <?php print apply_filters( 'taxonomy-images-list-the-terms', '', array(
    	'after'        => '</div>',
    	'after_image'  => '</span>',
    	'before'       => '<div class="swatches">',
    	'before_image' => '<span>',
    	'image_size'   => 'swatch',
    	'taxonomy'     => 'colours',
    ) ); ?>

    Can anyone help me with this?

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

  2. MichelleLeslie
    Member
    Posted 1 year ago #

    Did some more digging in the support archives. This thread solved it for me.

    Here's the code stevejonesdev's posted for those who need it.

    $categories =  get_categories(array( 'taxonomy' => 'series' ));
     foreach ($categories as $category) {
     	$tax_term_id = $category->term_taxonomy_id;
     	$images = get_option('taxonomy_image_plugin');
     	echo wp_get_attachment_image( $images[$tax_term_id], 'medium' );
     }
  3. MichelleLeslie
    Member
    Posted 1 year ago #

    Actually, not quite solved. This removed the links but made it so all my posts had the same taxonomy images (even though I specified different ones).

    If anyone knows another method, that would be much appreciated.

  4. Astony
    Member
    Posted 1 year ago #

    Has anyone found a solution for this?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic