Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
add_filter('single_post_title', function($post_title, $post){
$categories = get_the_category( $post->ID );
return $post_title . sprintf("【%s】", implode("|", array_map(function($cat){
return $cat->name;
}, $categories)));
return $post_title;
}, 99, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment