Add URL field to wordpress taxonomy

Never done it through direct coding. I use Advanced Custom Fields for this. Any type of custom field can be shown there, text, image, checbox, etc. And you have to set the location rule to be the Taxonomy screen. Category screen with custom fields: Documentation on how to retrieve the data.

How to orderby Taxonomy Term in a WP Query

You can’t order by taxonomy terms, the very concept breaks down when you try to handle posts that have multiple terms in a taxonomy. You may know that only 1 term will ever be selected but WP_Query isn’t built that way. Instead, keep your taxonomy so that you retain all the performance/theming/Admin UI benefits, but … Read more

How to display a term of taxonomy

I found the solution thanks to answer this question: Specify number of posts in my ‘tax_query’ I wanted to show the posts for ‘futbol’ within the ‘tipo_deporte’ taxonomy: <?php $args = array( ‘posts_per_page’ => 2, ‘tax_query’ => array( array( ‘taxonomy’ => ‘tipo_deporte’, ‘field’ => ‘slug’, ‘terms’ => array(‘futbol’), ) ) ); $query = new WP_Query( … Read more

Append taxonomy url

You have at least 3 ways of accomplishing this. Option 1 The easiest is to change your permalink structure to “Post Name”, and then create your landing pages with the slugs you want. So, your slug for york would be “trainers-in-york”. Option 2 If you absolutely must modify the url, you can use add_rewrite_rule to … Read more