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

Displaying custom taxonomy terms active trail

Maybe better to use wp_list_catergories.. codex: wp list categories $args = array( ‘taxonomy’ => ‘type’, ‘orderby’ => ‘name’, ‘show_count’ => false, ‘pad_counts’ => false, ‘hierarchical’ => true, ‘title_li’ => ” ); <ul> <?php wp_list_categories( $args ); ?> </ul> and add to css: .current-cat{ background-color: #d86f08; }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)