How To Capitalize Entries In the Taxonomy Box?

PHP has a function that does EXACTLY what you’re looking for, ucwords(). Leave the CSS capitalize on there, so that the users know it will be auto-capitalized, and then when you’re filtering the input (which you should be doing ANYWAYS, since it’s user input, run it through ucwords() right before database insertion.

wp_query to display custom taxonomy terms

For a custom taxonomy query add the ‘tax_query’ => array() $args = array( ‘post_type’ => ‘featured_job’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 9999999, ‘orderby’ => ‘date’, ‘order’ => ‘DES’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘job_category’, // custom taxonomy ‘field’ => ‘slug’, ‘terms’ => ‘business’, // taxonomy term (category) ), ), );

How to output content based on same custom taxonomy?

we meet here again 🙂 Try using this: $term_list = wp_get_post_terms( $post->ID, ‘persons’, array( ‘fields’ => ‘ids’ ) ); and ‘tax_query’ => array( array( ‘taxonomy’ => ‘persons’, ‘field’ => ‘id’, ‘terms’ => $term_list ) ), AFAIK, the tax_query accepts field by id or slug only (see here. And the wp_get_post_terms accepts only names (not slug), … Read more

Get ID and slug from taxonomy object

It sounds like you’re looking for the get_term_link() function. Your code will look something like this: <?php $catid = get_sub_field(‘selected_category’); $term_link = get_term_link( intval( $catid ), ‘product_cat’ ); ?> <h4><a href=”https://wordpress.stackexchange.com/questions/95584/<?php echo esc_url( $term_link ); ?>”><?php the_sub_field(‘title’); ?></a></h4> As you can see, get_term_link() takes two argument, the term and taxonomy. If you’re saving the term … Read more