Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 );
- add_action( 'genesis_after_header', 'sk_do_taxonomy_title_description' );
- function sk_do_taxonomy_title_description() {
- global $wp_query;
- if ( ! is_category() && ! is_tag() && ! is_tax() )
- return;
- $term = is_tax() ? get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ) : $wp_query->get_queried_object();
- if ( ! $term )
- return;
- $headline = $intro_text = '';
- if ( $headline = get_term_meta( $term->term_id, 'headline', true ) ) {
- $headline = sprintf( '<h1 %s>%s</h1>', genesis_attr( 'archive-title' ), strip_tags( $headline ) );
- } else {
- if ( genesis_a11y( 'headings' ) ) {
- $headline = sprintf( '<h1 %s>%s</h1>', genesis_attr( 'archive-title' ), strip_tags( $term->name ) );
- }
- }
- if ( $intro_text = get_term_meta( $term->term_id, 'intro_text', true ) )
- $intro_text = apply_filters( 'genesis_term_intro_text_output', $intro_text );
- if ( $headline || $intro_text )
- printf( '<div %s><div class="wrap">%s</div></div>', genesis_attr( 'taxonomy-archive-description' ), $headline . $intro_text );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement