Hot answers tagged

4

There are e.g. the following dynamic sanitize_term_fields() filters: edit_term_{$field} filter for the edit context pre_term_{$field} filter for the the db context term_{$field}_rss filter for the the rss context term_{$field} filter (default) and also the taxonomy-specific ones: edit_{$taxonomy}_{$field} filter for the edit context pre_{$taxonomy}_{$...


2

The dynamic filter "term_{$field}" is probably what you're looking for, where the field is "name." One approach is to have an array of names and their pseudonyms, then do a check-and-return on them so they'll display the replacement. add_filter( 'term_name', function( $value ) { $terms = [ 'old' => 'new', ]; // basic example check, ...


1

Since you're using a custom taxonomy, you can't use the category argument. You can find some information about custom taxonomy retrieval in this comment in the developer documentation. According to that, I think your $categoryArgs should be: $categoryArgs = array( 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => $type, '...


1

As of WP 3.7 (https://core.trac.wordpress.org/ticket/14206) you can add this argument to register_taxonomy: 'meta_box_cb' => 'post_categories_meta_box' to get the built-in checkbox category style metabox without having to make your taxonomy hierarchical. Also you could instead provide your own callback function to create your own metabox (i.e. with a ...



Only top voted, non community-wiki answers of a minimum length are eligible