Created
June 11, 2021 15:30
-
-
Save braddalton/516842e654d4b18f898f77479350a338 to your computer and use it in GitHub Desktop.
Only Show 1st Category in Post Meta https://wpsites.net/?p=103338
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
add_filter('the_category_list', 'only_show_first_category'); | |
function only_show_first_category( $cats ) { | |
return [$cats[0]]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment