By the way, I just saw this on line 40 of /buddypress/bp-templates/bp-legacy/buddypress/groups/create.php:
do_action( 'groups_custom_group_fields_editable' ); // @Deprecated
Does this mean that the function groups_custom_group_fields_editable
is a deprecated function? The ‘@Deprecated’ note is in a template file.
Also, if it is deprecated, what should I be doing instead to add custom group fields?
Thanks!
Shane,
As always, you’re super helpful! I’m almost there now.
http://pastebin.com/1xXw9rd9
One thing I still can’t figure out, however, is how to properly get my search string data into the meta query argument. This is what I have currently:
$gbgd_bpgf_querystring['meta_query'] = array(
'relation' => 'OR',
array(
'key' => 'group-custom-field-zip',
'value' => $gbgd_bpgf_querystring["search_terms"],
'type' => 'numeric',
'compare' => 'LIKE'
)
);
This doesn’t return any results. However, if I type the value for the above key directly into the array, for example I type:
$gbgd_bpgf_querystring['meta_query'] = array(
'relation' => 'OR',
array(
'key' => 'group-custom-field-zip',
'value' => 12345,
'type' => 'numeric',
'compare' => 'LIKE'
)
);
I’m able to get results. Any idea what I’m doing wrong here? I’ve var_dumped my values out to make sure they’re equivalent, tried typecasting the value to an int, etc.
BTW, in case it wasn’t obvious, I’m not using an option/select menu, but trying to grab search queries entered on the groups page.
Thanks!