Last active
December 20, 2015 01:09
-
-
Save scottnix/6047534 to your computer and use it in GitHub Desktop.
Thematic postfooter, only show category/categories
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
<?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