Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

  • timrourke
    Participant

    @timrourke

    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!


    timrourke
    Participant

    @timrourke

    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!


    timrourke
    Participant

    @timrourke

    Thanks, Hugo. I don’t doubt that you’re all very busy, and I appreciate your time responding to me.


    timrourke
    Participant

    @timrourke

    Thanks for your support. I already feel like an idiot for being so bad at programming. Not being able to find the ‘help me’ button made me feel worse. 🙂


    timrourke
    Participant

    @timrourke

    shanebp, you’re awesome! This is incredibly helpful stuff. I’ll start looking into this right away.

    Would this group metadata then be searchable, as well? This is extremely important for my use case. If not, any thoughts on how to include this metadata in group search results?

    Thanks again! Cheers,

    Tim

Viewing 5 replies - 1 through 5 (of 5 total)
Skip to toolbar