Filter on one post type with taxonimy and get other post type

tax_query with an ‘OR’ relation. This means that the query will fetch posts that meet either condition: they are ‘landing-pages’ with the specified taxonomy terms, or they are any of the other specified post types without additional taxonomy constraints. $args = array( ‘posts_per_page’ => 6, ‘post_status’ => ‘publish’, ‘order’ => ‘DESC’, ‘post_type’ => array(‘news’, ‘videos’, … Read more

Remove slug and custom post type name from URL

yes, possible to achieve the URL structure you desire by modifying the permalink structure for your custom post type and taxonomy. Firslty flush the rewrite rules by visiting the permalink settings page in your Wp admin area Settings > Permalinks and clicking Save Changes. This will regenerate the rewrite rules and apply your custom permalink … Read more

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’ );

Array terms, if term one, if term two, etc

I solved it like this. Although if there are more than 3 co-authors problems could arise $tagx = get_the_terms($post->ID , ‘autoria’); $number = count($tagx); if ( $number == 1) { $first_author = $tagx[0]; echo ‘<strong>’; echo esc_html( $first_author->name ); echo ‘</strong>’; } if ($number == 2) { $first_author = $tagx[0]; $second_author = $tagx[1]; echo ‘<strong>’; … Read more