Support

Account

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