Support

Account

Home Forums General Issues some problem with acf taxonomy Reply To: some problem with acf taxonomy

  • Hi @James
    Thanks for your quick answer and a desire to help.
    I will try to explain the problem as detailed as possible.

    1. For example – I get custom field “eee”, which should display multiple taxonomy (checkbox) – from parent taxonomy “trip”.
    http://joxi.ru/52azJO1IGY1gPA

    2. “trip” taxonomy structure in screen:
    http://joxi.ru/ZrJYE1Vt1y4QoA

    3. Field view in page:
    http://joxi.ru/ZrJYE1Vt1y4koA

    In final variant I need to display selected taxonomy and link to the page included in this taxonomy.
    Example:
    – title of selected taxonomy
    — post title + url
    — post title + url

    – title of selected taxonomy
    — post title + url
    — post title + url

    When I try to use this code:

    <?php 
    $terms = get_field('eee');
    if( $terms ): ?>
    	<ul>
    	<?php foreach( $terms as $term ): ?>
    		<h2><?php echo $term->name; ?></h2>
    		<p><?php echo $term->description; ?></p>
    		<a href="<?php echo get_term_link( $term ); ?>">View all '<?php echo $term->name; ?>' posts</a>
    	<?php endforeach; ?>
    	</ul>
    <?php endif; ?>

    It does`t give me any values only included taxonomies links (http://joxi.ru/V2VLGlnf0OjaLr) – in castom field I checked 2 taxonomy.

    Can`t use ID, because taxonomy not bind to specific pages.