Support

Account

Home Forums Add-ons Repeater Field Browse in repeater for post object Reply To: Browse in repeater for post object

  • I hate to admit it, but my filter at present is just this:

    <?php
     
    function my_acf_relationship_result( $html, $post )
    {
    	// add an image to each result
    	$image = get_field('thumbnail', $post->ID);
    	$date = get_the_date();
     
    	if( $image )
    	{
    		$html = '<img src="' . $image['url'] . '" />' . $html;
    	}
     
        return $html . ' ' . $date;
    }
     
    // acf/fields/relationship/result - filter for every field
    add_filter('acf/fields/relationship/result', 'my_acf_relationship_result', 10, 2);
     
    
    ?>

    and I’ve edited core/fields/relationship.php to change the sort order.

    Not ideal, I know, but I needed it to work quickly.