Created
February 10, 2013 13:03
-
-
Save furahaclothing/4749529 to your computer and use it in GitHub Desktop.
wordpress-スラッグからタクソノミー情報を取得する-
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
/*IDの取得*/ | |
<?php echo get_term_by('slug',$term,$taxonomy)->term_id ?> | |
/*名前の取得*/ | |
<?php echo get_term_by('slug',$term,$taxonomy)->name ?> | |
/*説明の取得*/ | |
<?php echo term_description(get_term_by('slug',$term,$taxonomy)->term_id,$taxonomy); ?> | |
/*URLの取得*/ | |
<?php echo get_term_link($term,$taxonomy); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment