PowenKo, WordPress Tutorial, category, Get current post of category.

November 26, 2011   ·   0 Comments

reference: http://codex.wordpress.org/Function_Reference/wp_get_object_terms

$post_cats = $wp_get_object_terms( $post->ID, 'category' );
foreach( $post_cats as $cat ){
    echo '<a href="/' . $cat->slug . '" title="' . $cat->name . ' Category">' . $cat->name . '</a>';
}
shareShare on FacebookShare on Google+Share on LinkedInEmail this to someonePrint this pageBuffer this pageDigg thisFlattr the authorShare on RedditPin on PinterestShare on StumbleUponShare on TumblrTweet about this on Twitter

By


Readers Comments (0)


You must be logged in to post a comment.

PowenKo’s Online Store

powenko_arduinoBook
Wordpress99

Wordpress

Amazon

adsbygoogle

Recent Posts

Categories

Amazon