Thank you. That got me further.
I have the search form now with submit button.
It is a catalog raisonné of modern string music.
I have this query string, but it only shows entries with the searched string in the composers names, the line-up and the year of composing - all of them are ACF custom fields. This works fine, but it shall also search for opus name (“Werktitel” or title of the CPT “werke”).
I guess my query string is wrong, but can’t figure it out.
Query before encoding to HTTP Query string
$query_args = array(
'posts_per_page' => '-1',
'ignore_sticky_posts' => true,
'post_type' => 'werke',
'post_status' => 'publish',
'order' => 'ASC',
'orderby' => 'meta_value',
'meta_key' => 'komponist',
'meta_query' => array(
'0' => array(
'key' => 'komponist',
'value' => '{{dc:url:param key="fsearch"}}',
'compare' => 'LIKE',
),
'1' => array(
'key' => 'besetzung',
'value' => '{{dc:url:param key="fsearch"}}',
'compare' => 'LIKE',
),
'2' => array(
'key' => 'kompositionsjahr',
'value' => '{{dc:url:param key="fsearch"}}',
'compare' => 'LIKE',
),
'3' => array(
'key' => 'title',
'value' => '{{dc:url:param key="fsearch"}}',
'compare' => 'LIKE',
),
'relation' => 'OR',
),
);
HTTP query String
posts_per_page=-1&ignore_sticky_posts=true&post_type=werke&post_status=publish&order=ASC&orderby=meta_value&meta_key=komponist&meta_query[0][key]=komponist&meta_query[0][value]={{dc:url:param key="fsearch"}}&meta_query[0][compare]=LIKE&meta_query[1][key]=besetzung&meta_query[1][value]={{dc:url:param key="fsearch"}}&meta_query[1][compare]=exp_like&meta_query[2][key]=kompositionsjahr&meta_query[2][value]={{dc:url:param key="fsearch"}}&meta_query[2][compare]=exp_like&meta_query[3][key]=title&meta_query[3][value]={{dc:url:param key="fsearch"}}&meta_query[3][compare]=exp_like&meta_query[relation]=OR
I hope you see the cause.
The link is in the secure note.
Thank you!
Hannes