Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

How can I display the custom taxonomy term name and slug? Iam using the Advanced Custom Fields plugin.

See the current code:

        $category = get_queried_object();
        $cur_cat = $category->term_id; // get current category ID
        $categoria = 'categorias-mensagens_' . $cur_cat;
        $location = get_field('categorias_relacionadas', $categoria); // advanced custom fields plugin getting the related terms    

        <ul id="categorias">

        <?php foreach($location as $term){ ?>

        <li><a href="<?php echo $term->slug; ?>"><?php echo $term->name; ?></a></li>  

        <?php } ?>
share|improve this question
I'm confused on what exactly you are looking for. Can you please rephrase the question? –  David Kryzaniak Jul 27 '13 at 20:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.