WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Tag or Category term_group Order

Adds a group field to tags and categories, allowing to sort them based on term_group order.

  1. Upload the category term_group order folder to /wp-content/plugins/.

  2. Activate the plugin through the "Plugins" menu in WordPress.

  3. You will now be able to set a 'Group' field for categories.

  4. Paste the following code in single.php , index.php , archive.php to display the categories based on term_group order

$args = array('orderby' => 'term_group', 'order' => 'ASC', 'fields' => 'all');

$terms = wp_get_object_terms($post->ID, 'category', $args );

$count = count($terms);

if($count > 0){

echo 'Posted in <ul id="catlist">';

foreach ($terms as $term) {

echo '<li><a href="'.get_term_link($term->slug, 'category').'">'.$term->name.'</a> .</li>';

}

echo '</ul>';

}

Requires: 3.0.1 or higher
Compatible up to: 3.5.2
Last Updated: 2013-3-8
Downloads: 2,495

Ratings

4 stars
4.9 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,3,3
100,1,1
100,1,1
100,1,1