Support

Account

Home Forums Backend Issues (wp-admin) Modifying relationship field search

Unread

Modifying relationship field search

  • I used filter “acf/fields/relationship/result/key=field_5437ccfbee55b” to modify relationship field list, so it shows string made from the repeater field instead of only title.

    Modified relationship field list

    Now what Im trying to do is to modify search filter, so it can search into this repeater field, not only in title.

    I tried doing something like this, but it doesnt work:

    
    function my_acf_result_query( $args, $field, $post ) {
        $args['meta_query'] = array(
    		array(
    			'key' => 'oferta_%_nazwa',
    			'value' => 'Wykonanie noży do docinania',
    			'compare' => '=',
    		)
        );
    
        return $args;
    } add_filter('acf/fields/relationship/result/key=field_5437ccfbee55b', 'my_acf_result_query', 10, 2);
    
Viewing 1 post (of 1 total)

The topic ‘Modifying relationship field search’ is closed to new replies.