Support

Account

Home Forums Backend Issues (wp-admin) Custom admin taxonomy displaying Reply To: Custom admin taxonomy displaying

  • Hi @artisancodeur

    Thanks for the clarification. To change the text displayed on the admin, you can hook into acf/fields/taxonomy/result filter and then fetch the values of the custom fields containing the price.

    The code would look something like this:

    <?php
    
    function my_relationship_result( $title, $term, $field, $post_id ) {
    	
    	// load a custom field from this $object and show it in the $result
    	$price = get_field('price', $post->ID);
    	
    	
    	// append to title
    	$title .= ' [' . $rice .  ']';
    	
    	
    	// return
    	return $title;
    	
    }
    
    // filter for a specific field based on it's name
    //add_filter('acf/fields/taxonomy/result/name=my_taxonomy', 'my_relationship_result', 10, 4);
    
    ?>