I've tried looking for a article that can help but not getting far, I have a custom post;
<?php
$args = array(
'post_type' => 'swatches',
'posts_per_page' => 9999,
'order' => 'ASC',
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
?>
And I want to output the title (easy) and the custom post category it relates to e.g. luxury, standard etc. I've added;
'taxonomies' => array('swatches-category','swatches-tags')
In my functions and can get it to display all of the categories but not the one it relates too.
I'm trying;
<?php $terms = get_terms('swatches-category'); echo $term->name; ?>
But no success...
Can anyone help please?
Thanks in advance