Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Last active October 5, 2020 15:36
Show Gist options
  • Select an option

  • Save yousufansa/ddebb2a13957551cfe4cf969a801296a to your computer and use it in GitHub Desktop.

Select an option

Save yousufansa/ddebb2a13957551cfe4cf969a801296a to your computer and use it in GitHub Desktop.
Vodi - Display Movie Genre and Movie Tag Term Description in Term Archive Page
if ( ! function_exists( 'vodi_child_display_term_description' ) ) {
function vodi_child_display_term_description() {
if( is_tax() ) {
$tax_obj = get_queried_object();
if( is_tax( 'movie_genre' ) || is_tax( 'movie_tag' ) || taxonomy_is_movie_attribute( $tax_obj->taxonomy ) ) {
$term_description = term_description();
if( ! empty( $term_description ) ) {
echo '<div class="term-description">' . $term_description . '</div>';
}
}
}
}
}
add_action( 'masvideos_before_movies_loop', 'vodi_child_display_term_description', 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment