Order terms by creation date

If you want to achieve that, then you need to add creation_date for each taxonomy, hooked with ‘create_category’ (or create_YOURTAXONOMYNAME) function. lets say,for example, you add a new category : add_action( “create_category”, ‘my_func123’, 10, 2 ); function my_func123( $term_id, $tt_id){ update_option(‘my_taxnm_date_’.$term_id, time()); } then later, anytime, you will be able to get the creation date … Read more

Group & Sort Taxonomy terms by letter – Is there a better way?

Here is the way I did it, add_action(‘the_content’, ‘lm_alpha_order’); function lm_alpha_order($content){ if(is_page(‘alphabetique’)){ $args = array( ‘taxonomy’ => ‘media_tag’, ‘hide_empty’ => true, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’ ); $terms = get_terms(‘media_tag’, $args); $azRange = range(‘A’, ‘Z’); echo ‘<div class=”half left” style=”float:left;padding-left: 2em;”>’; foreach ($azRange as $letter) { $letter_outputs=””; $the_letter =false; //print(“$letter\n”); $count = 0; $ul=”<ul … Read more

Categories and Tags Conflict after Woocommerce Installation

I was able to resolve this issue by changing the rewrite slug from product-tag to product_tag when registering the taxonomy. It looks like WP does not like the hyphen and prefers the underscore. $args = array( ‘hierarchical’ => false, ‘labels’ => $labels, ‘show_ui’ => true, ‘show_admin_column’ => true, ‘update_count_callback’ => ‘_update_post_term_count’, ‘query_var’ => true, ‘rewrite’ … Read more