Home › Forums › General Issues › acf text field to select values… › Reply To: acf text field to select values…
I have moved away from that ‘solution’ and doing this one right now:
function key_value_select( $key ) {
global $wpdb;
$args = array( 'post_type' => 'post' , 'post_status' => 'publish' , 'post_per_page' => -1);
$getposts = get_posts( $args );
foreach($getposts as $post) : setup_postdata($post);
$themeta = get_post_meta($post->ID, $key ,true);
$meta_value = $themeta;
$meta_value .= ' => ';
$meta_value .= $themeta;
$meta_value .= ' , ';
endforeach;
return $meta_value;
}
and in conjuction with the WP Advanced Search framework I get PHP warning >> PHP Warning: array_reverse() expects parameter 1 to be array, string given in …
I have asked at wpas’ support @ github.
Cheers,
Adam
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.