Created
October 4, 2013 04:18
-
-
Save guzuri/6820879 to your computer and use it in GitHub Desktop.
カスタムタクソノミーの出力(リンク無し)
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 | |
//hoge:出力したいカスタムタクソノミー | |
$tarms = get_the_terms( $post -> ID ,'hoge' ); | |
foreach ( $tarms as $tarm ) {echo $tarm -> name;} | |
//'category''post_tag'でそれぞれdefaultカテゴリーとタグも利用可 | |
//$termsの[数値]はどーもカテゴリID諸々が入る様で[0]とかでは空っぽ。 | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment