The dynamic hook {taxonomy}_term_edit_form_top
can be used to output a link to the term’s archive page.
Since we’re dealing with terms under the genre
taxonomy, we will attach our callback to the genre_term_edit_form_top
hook.
/**
* Adds a link to top of edit term form for terms under the
* genre taxonomy.
*
* @param object $tag Current taxonomy term object.
* @param string $taxonomy Current $taxonomy slug.
*/
add_action( 'genre_term_edit_form_top', 'wpse_add_genre_link', 10, 2 );
function wpse_add_genre_link( $tag, $taxonomy ) {
$term_link = get_term_link( $tag ) ; ?>
<div class="term-link-container">
<strong><?php _e( 'See this page:', 'text-domain' ); ?></strong>
<a href="https://wordpress.stackexchange.com/questions/275235/<?php echo esc_url( $term_link ) ?>"><?php echo esc_html( $term_link ); ?></a>
<div><?php
}