Autofill advanced custom field with user data

Yes, it can be done (it’s almost always true ;))… The question is how to do this? 😉 And here is the solution… You’ll have to use acf/load_field filter: function set_acf_field_default_value( $field ) { switch ( $field[‘name’] ) { case ‘name_provider’: $field[‘value’] = ‘PUT YOUR VALUE HERE’; break; } return $field; } add_filter(‘acf/load_field’, ‘set_acf_field_default_value’ ); … Read more

How to get value of a selected option from select tag and use it in WP_query to filter posts?

I assume you have posts with custom fields that have your select fields values as values for these custom fields, in this case you should take a closer look in ‘Custom Fields Paramenters’ from the WP_Query class references at: https://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters doing so you can just compare you select fields values with your post custom fields … Read more