get_the_term_list [ WordPress Function ]
get_the_term_list ( $id, $taxonomy, $before = '', $sep = '', $after = '' )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: get_the_terms, get_the_tag_list, get_the_category_list, get_edit_term_link, get_the_title
Retrieve a post's terms as a list with specified format.
Source
<?php
function get_the_term_list( $id, $taxonomy, $before = '', $sep = '', $after = '' ) {
$terms = get_the_terms( $id, $taxonomy );
if ( is_wp_error( $terms ) )
return $terms;
if ( empty( $terms ) )
return false;
foreach ( $terms as $term ) {
$link = get_term_link( $term, $taxonomy );
if ( is_wp_error( $link ) )
return $link;
$term_links[] = '<a href="' . esc_url( $link ) . '" rel="tag">' . $term->name . '</a>';
}
$term_links = apply_filters( "term_links-$taxonomy", $term_links );
return $before . join( $sep, $term_links ) . $after;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/get the term list « WordPress Codex
Description. Returns an HTML string of taxonomy terms associated with a post and given taxonomy. Terms are linked to their respective term listing pages.
codex.wordpress.org - WordPress › Support » Taxonomy 'get_the_term_list' redirect
[resolved] Taxonomy 'get_the_term_list' redirect (5 posts) ... Anyone know a way to change the 'get_the_term_list' or to dynamically redirect the taxonomy page ...
wordpress.org - Get_the_term_list inexplicably adds values in foreach
Mar 12, 2012 ... All is going fairly well, except for an issue I'm having with get_the_term_list . For some reason it adds the number "1" in front of each correctly ...
wordpress.stackexchange.com - Displaying Custom WordPress Taxonomy List Items Without the ...
Apr 21, 2011 ... My only problem was that while the most obvious choice for this was WP function “get_the_term_list()“, it outputs the taxonomy terms as links, ...
readydesigns.com
Kullanýcý Tartýþmalarý [ wordpress.org ]
- husdaman on "Taxonomy 'get_the_term_list' redirect"
- formica on "Taxonomy 'get_the_term_list' redirect"
- husdaman on "Taxonomy 'get_the_term_list' redirect"
- trixienolix on "Adding taxonomy term to body_class on single.php"
- trixienolix on "Adding taxonomy term to body_class on single.php"
- trixienolix on "Adding taxonomy term to body_class on single.php"
- trixienolix on "Adding taxonomy term to body_class on single.php"
- keesiemeijer on "get_the_term_list Separating"
- meko6 on "get_the_term_list Separating"
- keesiemeijer on "get_the_term_list Separating"