Forum Replies Created
-
AuthorPosts
-
timgrahl
ParticipantOk, I found these two pages:
And added this to my functions.php file:
add_filter('asp_query_args', 'asp_add_my_meta_filter', 10, 1); function asp_add_my_meta_filter( $args ) { $args['search_type'] = array('users'); $args['post_meta_filter'] = array( array( 'key' => 'public_profile', // meta key 'value' => 'yes', // int|float|string|array|timestamp|datetime 'operator' => 'LIKE', 'allow_missing' => false // allow match if this custom field is unset )); return $args; }But it’s still returning users with public_profile set to “no”.
Any ideas?
timgrahl
ParticipantAH! That worked! Thanks so much!
One more question…
I have a custom field public_profile that has values “yes” and “no”.
I need to make sure that only users with public_profile set to “yes” show up in the results. Is there a way to do that?
timgrahl
ParticipantI tried manually adding the values and it wasn’t actually searching correctly.
See timestamp 2:27 of the video I sent you:
https://www.dropbox.com/s/ehy102f0opqob8p/Ajax%20Search%20Pro%20and%20ACF.mp4?dl=0I added you as an admin user to guild.storygrid.com
Username: ajaxsearchpro
Password: DcqIhZKYsdPbWgC(f#*%DfjOLet me know. Thanks so much!
timgrahl
ParticipantJust following up on this as it’s been four days since I sent this in.
-
AuthorPosts