Skip to content

Instantly share code, notes, and snippets.

@evansolomon
Created June 13, 2012 08:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save evansolomon/2922692 to your computer and use it in GitHub Desktop.
Save evansolomon/2922692 to your computer and use it in GitHub Desktop.
Capitalize category names in WordPress
<?php
/*
Plugin name: Capitalize category names on display
Description: Capitalize the first letter of a category name when it's displayed in the theme
*/
function capitalize_category_names_on_display( $name ) {
return ucfirst( $name );
}
add_filter( 'single_cat_title', 'capitalize_category_names_on_display' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment