Support

Account

Home Forums ACF PRO Get link from taxonomy field Reply To: Get link from taxonomy field

  • Found my solution here:

    <?php
    			$args = array( 'hide_empty' => '0');
    			$categories = get_categories($args);
    			if($categories){
    				echo '<ul class="product-categories">';
    				foreach($categories as $category) {
    					echo '<li>';
    					$link = get_field('category_link', 'category_'.$category->term_id);
    					
    					echo '<a href="'.$link.'"><span class="cat-title">' . $category->name . '</span></a>';
    					
    					echo '</li>';
    				} 
    				echo '</ul>';
    			}    
    
    			?>