How to list all categories and tags in a page?

TERM METADATA It’s possible to get thumbnails for terms using the new Term Metadata in 4.4. You just also need to define those ahead of time yourself. add_term_meta( int $term_id, string $meta_key, mixed $meta_value, bool $unique = false ) get_term_meta( int $term_id, string $key = ”, bool $single = false ) update_term_meta( int $term_id, string … Read more

How to get the singular name of a custom taxonomy?

EDIT Since I missunderstood your question at first, here’s the update that should do what you want. $taxonomies = get_object_taxonomies( ‘my_post_type’, ‘object’ ); foreach($taxonomies as $tax){ echo $tax->labels->singular_name; } Basically, you need to specify to the get_object_taxonomies function that you want an object to be returned. In your function, I’m not sure where the $args … Read more

Archive page with multiple taxonomies rewrite

ok, so I thought I’d come back and answer my own question in case its useful to someone else. To start, the CPT: ‘query_var’ => true, ‘has_archive’ => false, ‘rewrite’ => array( ‘slug’ => ‘resources’, ‘with_front’ => false ), Tax1: ‘query_vars’ => true, ‘rewrite’ => array( ‘slug’ => ‘resources/type’, ‘with_front’ => false ) Tax2: ‘query_vars’ … Read more

Changing the priority of a custom taxonomy’s metabox

As is often the case in WP, there are a number of ways to attack this problem. Here’s one possible way: function my_meta_box_order() { global $wp_meta_boxes; $genre = $wp_meta_boxes[‘post’][‘side’][‘core’][‘genrediv’]; unset($wp_meta_boxes[‘post’][‘side’][‘core’][‘genrediv’]); $wp_meta_boxes[‘post’][‘side’][‘core’] = array(‘genrediv’ => $genre) + $wp_meta_boxes[‘post’][‘side’][‘core’]; } add_action(‘add_meta_boxes_post’, ‘my_meta_box_order’); # We’re hooking into: do_action(‘add_meta_boxes_’ . $post_type, $post); $wp_meta_boxes holds all the meta box information. … Read more