我正在使用分类法图像插件,并试图对分类法进行排序,但分类法图像效果不佳。这项工作:
$terms = get_terms( \'work_cat\', $args );
但事实并非如此:
$terms = apply_filters( \'taxonomy-images-get-terms\', \'\', $args );
有什么想法吗?以下是完整的查询:
<?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 »</a></div>
<?php $i++;
}
?>
原职务:
http://wordpress.org/support/topic/plugin-taxonomy-images-doesnt-adhere-to-orderby-argument