Last active
October 5, 2020 15:36
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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