Show only taxonomy types terms associated with a custom post type in WordPress PHP

UPDATE The custom SQL query below can be used to produce a list of unique types taxonomy terms that have been assigned to newsroom posts. In PHP, you can call the function get_newsroom_types_terms to get the list: $terms = get_newsroom_types_terms();. Custom SQL query function get_newsroom_types_terms() { global $wpdb; $table_prefix = $wpdb->prefix; $taxonomy = ‘types’; $post_type=”newsroom”; … Read more

Filtering according to the locale ‘de_DE’

To achieve filtering according to the locale de_DE for the taxonomy terms displayed in the search box selector, you can use a similar approach as your archive title filter. add_filter(‘wp_dropdown_categories’, function( $output, $args ) { $locale = get_locale(); if (‘de_DE’ == $locale && $args[‘taxonomy’] == ‘tipologia’) { // Modify output for German locale and ‘tipologia’ … Read more