• Hi!

    I am using wordpress 4.0.1 and installed the ACF plugin. Then created a “subtitle” custom field for categories.

    Now I want to show the category subtitle in category.php …

    According to the documentation I should use this:

    <?php
    	// vars
    	$queried_object = get_queried_object();
    	$taxonomy = $queried_object->taxonomy;
    	$term_id = $queried_object->term_id;
    ?>
    <h2><?php the_field('subtitle', $term_id ); ?></h2>

    Unfortunately nothing shows. What is the mistake here.
    (I tried to place the above code outside and inside loop – both show nothing!)

    Any help?
    `

  • The topic ‘[Advanced Custom Fields] – Get subtitle for category’ is closed to new replies.