Wordpress get terms by their order in certain post

in my website am fetching the terms with this method

$terms = wp_get_post_terms($article_id, 'category_article', [
    'number' => 3
]);

Am trying to get terms by their order in that specific post for example: in this post the terms are - (orange,apple) in other post its (apple,orange).

Upvotes: 0

Views: 280

Answers (1)

Maulik Paddharia
Maulik Paddharia

Reputation: 80

Please try the below code -

echo strip_tags( get_the_term_list( $post->ID, 'job_titles', '', ', ') );
//'job_titles' Replace with your taxonomy slug 

Might it can help you.

Upvotes: 1

Related Questions