Created
October 27, 2015 00:03
-
-
Save taniarascia/8c78bebeb54dd68d08ad to your computer and use it in GitHub Desktop.
Add category to post
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 | |
foreach((get_the_category()) as $category) { | |
if ($category->cat_name != 'Uncategorized') { | |
echo '<a class="category-block" href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> '; }} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment