How to overwrite registered taxonomy url from vendor plugin in child theme

You don’t need those custom rewrites and term permalink tweaks, so just remove these and the relevant callbacks: add_action(‘init’,’theme_child_custom_rewrite’, 1000); add_filter( ‘term_link’, ‘listing_region_term_link’, 1, 3 ); And just use the register_taxonomy_args hook to override the taxonomy’s parameters: function override_listing_region_taxonomy_args( $args, $taxonomy ) { if ( ‘listing-region’ === $taxonomy ) { $args[‘rewrite’] = array( ‘slug’ => … Read more

Custom plugin: Loop through taxonomy types and update columns for all types?

The only things I see different in your code are the add_filter() and add_action() calls (e.g. the callback/function name), so you can use the same functions for all of the types: function update_dog_type_columns( $columns ) { // your code return $columns; } function update_dog_type_column( $column, $post_id ) { // your code } And then you … Read more

How do I get array of types associated with a taxonomy?

You’re using the correct code (get_taxonomy(‘dog’)->object_type) or function, but it should only be used after the taxonomy has been registered. Otherwise, the function would return a false instead of a proper taxonomy object which contains properties like object_type which is an array of post types registered for the taxonomy. And because taxonomies are normally (or … Read more

Display the description of taxonomy terms

get_terms() returns an array of WP_Term objects. To get the description, with the usual filters applied, you can pass this object to term_description(): $terms = get_terms( array( ‘taxonomy’ => ‘organizer’, ‘hide_empty’ => false, ) ); if ( ! is_wp_error( $terms ) ) { foreach ( $terms as $term ) { echo term_description( $term ); } … Read more

Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu

For anyone having the same trouble, I am now using a workaround from the accepted answer on the following question: https://wordpress.stackexchange.com/a/30723/181214 I am using the solution beyond the “EDIT: Another Option” which is working fine for slugs, names, singular names etc. function get_labels() { // return a default slug if(!defined(‘WPLANG’) || !WPLANG || ‘de_DE’ == … Read more