I’m using get_the_term_list and manage_posts_custom_column to display the terms of a custom taxonomy in the list of custom posts, in the WordPress Admin.
add_action( 'manage_mycustompost_posts_custom_column' , 'custom_mycustompost_column', 10, 2 );
function custom_mycustompost_column( $column, $post_id ) {
switch ( $column ) {
case 'category_names':
echo get_the_term_list( $post_id , 'mycustomcategory' , '' , ',' , '' );
break;
}
}
However, for each taxonomy term, I get a link to the public page that shows posts for that term:
http://www.myblog.com/mycustomcategory/test/
I would like to get a link that filters the list in the WordPress Admin. I would like a link like:
http://www.myblog.com/wp-admin/edit.php?post_type=post&category_name=news
The type of link I get in the Posts list, for tags or categories of the default WordPress posts.
Is there a WordPress function that does that?
It doesn’t have it wrapped inside a function you can use, but the following will work: