How to show the a custom taxonomy term on single post metadata

You might be able to use the the_author_posts_link filter to do this: add_filter( ‘the_author_posts_link’, functoin ($link) { global $post_id; // get “source” tax terms $sources = get_the_terms( $post_id, ‘source’ ); // build html $html=””; foreach ($sources as $source) { $html += ‘<a href=”‘. get_term_link($source) .'”>’. $source->name .'</a>’; } // pre-pend html to author link $link … Read more

Display Custom Toxonomy In WordPress and theme Widgets category selection dropdown list

I took a look at the theme’s code. the function covernew_get_terms() function accepts a taxonomy argument, take a look at the source code: /** * Returns all categories. * * @since CoverNews 1.0.0 */ if (!function_exists(‘covernews_get_terms’)): function covernews_get_terms( $category_id = 0, $taxonomy=’category’, $default=”” ){ #… rest of the code } endif; By default the taxonomy … Read more

Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?

If your taxonomy is non-hierarchical like tags, change value of input to $term->name. Took me a while to figure it out. It’s crazy but wordpress handle non-hierarchical taxonomies by their name in forms and not ids. echo “<input type=”radio” id=’in-$id’ name=”{$name}””.checked($current,$term->term_id,false).”value=”$term->name” />$term->name<br />”;

How to have the same url structure for both a CPT and a Taxonomy?

There is no easy way, because it will cause conflicts. This means you have to solve those conflicts yourself and implement some logic, that will determine what to show. Here’s sample approach: add_filter( ‘term_link’, ‘repair_categories_link’, 10, 3 ); add_action( ‘parse_request’, ‘repair_links’ ); add_action( ‘pre_get_posts’, ‘repair_query_post_type’ ); // First we have to modify links for categories … Read more