Skip to content

Instantly share code, notes, and snippets.

@scottnix
Last active December 20, 2015 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottnix/6047534 to your computer and use it in GitHub Desktop.
Save scottnix/6047534 to your computer and use it in GitHub Desktop.
Thematic postfooter, only show category/categories
<?php
// remove all postfooter information except for post category
// thematictheme.com/forums/topic/post-footer/
// override, show only categories in postfooter
function childtheme_override_postfooter() {
$post_type = get_post_type();
$post_type_obj = get_post_type_object($post_type);
$tagsection = get_the_tags();
if ( $post_type == 'page' ) {
$postfooter = '';
} else {
$postfooter = '<div class="entry-utility">';
$postfooter .= thematic_postfooter_postcategory();
$postfooter .= "\n\t\t\t\t\t</div>";
}
echo $postfooter;
}
// override, remove unneeded code from postcategory
function childtheme_override_postfooter_postcategory() {
$postcategory = "\n\t\t\t\t\t\t" . '<span class="cat-links">';
if ( is_single() ) {
$postcategory .= __('Categories ', 'thematic') . get_the_category_list(', ');
} elseif ( is_category() && $cats_meow = thematic_cats_meow(', ') ) {
$postcategory .= __('Also posted in ', 'thematic') . $cats_meow;
} else {
$postcategory .= __('Posted in ', 'thematic') . get_the_category_list(', ');
}
$postcategory .= '</span>';
return $postcategory;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment