Wordpress obtenir le terme du poste actuel

Exemples de code

6
0

wordpress obtenir la taxonomie d'un post

//Get all terms (names) of a taxonomy of a post
$term_obj_list = get_the_terms( $post->ID, 'taxonomy_name' ); ?>
5
0

wordpress obtenir la taxonomie d'un article

<?php $term_obj_list = get_the_terms( $post->ID, 'taxonomy_name' ); ?>
1
0

obtenir la taxonomie nom dans singhle post

// RETRIVE TERM SLUG ( for single.php or template-part )

$terms = get_the_terms( $post->ID, 'your-taxonomy' );
if ( !empty( $terms ) ){
    // get the first term
    $term = array_shift( $terms );
    echo $term->slug;
}
1
0

obtenir le nom de la taxonomie dans singhle post

// RETRIVE TERM SLUG ( for single.php or template-part )

$terms = get_the_terms( $post->ID, 'your-taxonomy' );
if ( !empty( $terms ) ){
    // get the first term
    $term = array_shift( $terms );
    echo $term->slug;
}
0
0

get post par nom wordpress

$posts = get_posts(array('name' => 'your-posts-name', 'post_type' => 'faq'));

Dans d'autres langues

Cette page est dans d'autres langues

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................