Skip to content

Instantly share code, notes, and snippets.

@rustyeddy
Last active August 29, 2015 14:04
Show Gist options
  • Save rustyeddy/dce79bda8e2296900464 to your computer and use it in GitHub Desktop.
Save rustyeddy/dce79bda8e2296900464 to your computer and use it in GitHub Desktop.
Formatting the category pages
if ( is_single() || is_page() ) {
gs_remove_entry_title();
$title = get_the_title();
} else if ( is_author() ) {
$title = get_the_author();
$class .= ' author';
} else if ( is_category() || is_archive() ) {
$class .= ' archive';
$cats = get_the_category();
$cat = $cats[0];
$title = $cat->name;
} else if ( is_404() ) {
$title = "OOPS! I don't know what your looking for!";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment