Exclude Taxonomy Terms from Template Via Back End?

You might be able to accomplish this using Advanced Custom Fields: http://www.advancedcustomfields.com/resources/taxonomy/ Field groups, like the taxonomy field, can be assigned to templates. Editing the taxonomy archive page, the user would see checkboxes (or radio buttons, or a select menu) for the taxonomy terms. In the corresponding “taxonomy archive” template (from link above)… <?php $terms … Read more

Insert form checkbox at bottom of taxonomy edit term page

My bad – the mark up for the edit page is different than add. Used this instead add_action(‘provider_edit_form_fields’, array($this, ‘category_metabox_edit’), 10, 1); // add image field in edit form function category_metabox_edit($tag) { $term_val = get_term_meta($tag->term_id, ‘show_on_provider’, true); $term_val == 1 ? $checked = ‘checked’ : $checked = ”; echo ‘<tr class=”form-field”> <th scope=”row” valign=”top”><label for=”show_on_provider”>’ … Read more

Reverse traversing taxonomy based on term_id

Thanks to @ialocin in his comment above, I took his recommendation and adapted it to fit my needs. Traversing the taxonomy hierarchy from the bottom up is actually relatively simple if you understand how WordPress does this from the top down. function origin_trail_ancestor($cat_id = 0, $link = false, $trail = false) { global $wp_query; $anchor … Read more

Change sub-menu position of custom taxonomy

Unluckily does not exist a clean way to do this, because register taxonomy doesn’t provide a menu_order argument. But you can act on global $submenu variable and reorder it, something like add_action( ‘admin_menu’, function() { global $submenu; $found = FALSE; $before = $after = array(); $tax_slug = ‘my_custom_tax’; // change your taxonomy name here foreach … Read more