translating a custom taxonomy term in a shortcode

Here you are dealing with 2 taxonomy for getting the term name which is wrong. You just need to do this `$term_name = get_the_terms (get_the_ID(), ‘intro’)[0]->name;` Once you get the $term_name then you can apply your locale to display it. <?php echo __( $term_name, ‘YOUR_DOMAIN’ );

#038 & wordpress Help

esc_url() has a $_context argument which defaults to ‘display’. It will replace & with &#038; unless you change context to something else, e.g. sanitize_url uses ‘db’. (Why it uses &#038; instead of the usual &amp; I don’t understand, but it’s deliberate.) I’m guessing you’re calling esc_url() somewhere in your code where you should be calling … Read more

Including product categories (product_cat taxonomy) title and description in search query

Found out my solution by filtering the search query. Hope that helps: function new_search_join( $join ) { global $wpdb; if ( is_search() ) { $join .= ” INNER JOIN {$wpdb->term_relationships} ON {$wpdb->posts}.ID = {$wpdb->term_relationships}.object_id INNER JOIN {$wpdb->term_taxonomy} ON {$wpdb->term_taxonomy}.term_taxonomy_id = {$wpdb->term_relationships}.term_taxonomy_id INNER JOIN {$wpdb->terms} ON {$wpdb->terms}.term_id = {$wpdb->term_taxonomy}.term_id”; } return $join; } add_filter(‘posts_join’, ‘new_search_join’ ); … Read more

WPML posts_joins on translated items

Finally able to find out a working solution. The inner join has to join term_taxonomy (where we find the term) to icl_translations with current language. And then from icl_translation to the origin language to get the element_id that then this element_id to term_relationships (where all the product from the origin product_cat are listed). If that … Read more