Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get taxonomy name in 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;
}
Comment

PREVIOUS NEXT
Code Example
Php :: datetime to string php 
Php :: php delete array item by value 
Php :: php get current url without filename 
Php :: install phpmyadmin ubuntu 
Php :: laravel insert 
Php :: uuid package generator laravel 
Php :: carbon minus 1 day 
Php :: carbon add days from specific date 
Php :: wordpress echo the excerpt 
Php :: select case default php 
Php :: magento 2 get connection 
Php :: hashing passwords in yii 1 
Php :: php date and time 
Php :: unzip file php 
Php :: laravel eloquent search query 2020 
Php :: php close window after script runs 
Php :: woocommerce-cart-count 
Php :: phpMyAdmin is not able to cache templates 
Php :: composer remove cache 
Php :: The mysqli extension is missing. Please check your PHP configuration. 
Php :: php array to console 
Php :: save html form data to text file using php 
Php :: codeigniter 4 pagination descending 
Php :: php regex validate username 
Php :: laravel latest() 
Php :: carbon time ago laravel 
Php :: dynamic alert php 
Php :: laravel log permission denied mac 
Php :: php artisan serve a folder 
Php :: laravel redirect back with input 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =