Created
February 7, 2018 23:09
-
-
Save CapWebSolutions/1320c3772b8d6f1e25701148085afed1 to your computer and use it in GitHub Desktop.
Manually insert Category Title to Blog Categories
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
| //* Manually insert Cat Title to Blog Categories | |
| remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); | |
| add_action('genesis_before_loop','prefix_cat_title', 16); | |
| function prefix_cat_title () { | |
| if( is_category() || is_tag() || is_tax() ) { | |
| global $wp_query; | |
| $term = is_tax() ? get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ) : $wp_query->get_queried_object(); | |
| $intro_text = apply_filters( 'genesis_term_intro_text_output', $term->meta['intro_text'] ); | |
| printf('<div class="archive-description"><h1 class="archive-title">%1$s</h1>%2$s</div>', single_cat_title( '', false ), $intro_text); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment