-
-
Save navalon/c73c8d4fce1a84d07ffbbb509bc293a1 to your computer and use it in GitHub Desktop.
How to enclose Headline and Intro Text on archive pages in a wrap in Genesis. https://sridharkatakam.com/enclose-headline-intro-text-wrap-archive-pages-genesis/
This file contains 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
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); | |
add_action( 'genesis_after_header', 'genesis_do_taxonomy_title_description' ); |
This file contains 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
// Remove custom headline and / or description from category / tag / taxonomy archive pages | |
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); | |
// Add custom headline and / or description on category / tag / taxonomy archive pages | |
add_action( 'genesis_after_header', 'sk_taxonomy_title_description_opening_wrap' ); | |
add_action( 'genesis_after_header', 'genesis_do_taxonomy_title_description' ); | |
add_action( 'genesis_after_header', 'sk_taxonomy_title_description_closing_wrap' ); | |
function sk_taxonomy_title_description_opening_wrap() { | |
echo '<div class="custom-archive-description"><div class="wrap">'; | |
} | |
function sk_taxonomy_title_description_closing_wrap() { | |
echo '</div></div>'; | |
} |
This file contains 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
.custom-archive-description { | |
background-color: #fff; | |
padding: 40px; | |
} | |
.archive-description { | |
padding: 0; | |
margin-bottom: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment