WordPress.org

Support

Support » Plugins and Hacks » Taxonomy Images » [Resolved] [Plugin: Taxonomy Images] Doesn't adhere to 'orderby' argument

[Resolved] [Plugin: Taxonomy Images] Doesn't adhere to 'orderby' argument

  • I’m trying to sort the taxonomy but Taxonomy Images isn’t playing nice. This works:

    $terms = get_terms( 'work_cat', $args );

    but this doesn’t:

    $terms = apply_filters( 'taxonomy-images-get-terms', '', $args );

    Any ideas? Here’s the full query:

    <?php
    	$args = array(
    		'taxonomy'     => 'work_cat',
    		'orderby'      => 'id',
    		'order'        => 'ASC',
    		'hierarchical' => 1,
    	);
    
    	$terms = apply_filters( 'taxonomy-images-get-terms', '', $args );
    
    	$i = 0;
    	$len = count($categories);
    	foreach ($terms as $term) {
    	?>
    		<div class="fourcol <?php if ($i == 0): ?> first<?php elseif ($i == $len - 1): ?> last<?php endif; ?>">
    		<a href="<?php echo get_term_link($term->slug, 'work_cat'); ?>"><?php echo wp_get_attachment_image( $term->image_id, 'full' ); ?></a>
    		<h2><?php echo $term->name; ?></h2>
    		<p><?php echo $term->description; ?></p>
    		<a href="<?php echo get_term_link($term->slug, 'work_cat'); ?>">See More &raquo;</a></div>
    
    	<?php $i++;
    	}
    ?>

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

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] [Plugin: Taxonomy Images] Doesn't adhere to 'orderby' argument’ is closed to new replies.
Skip to toolbar