• Hi,

    The site I am developing will have various levels of user, I want visitors to have the capability to search for contributors only. Is it possible to edit any of the files to achieve this.

    I have managed to display a global map that is limited to contributors with specific custom field values, but don’t know how to modify /limit the search results.

    any pointers would be fantastic.

    Thanks Tkhan

    https://wordpress.org/plugins/geo-mashup/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dylan Kuhn

    (@cyberhobo)

    I believe this feature request would make this possible with a template tag:

    https://code.google.com/p/wordpress-geo-mashup/issues/detail?id=690

    Currently you’d have to use the query filters to do it, which would be more involved:

    https://code.google.com/p/wordpress-geo-mashup/wiki/PhpApi#geo_mashup_locations_join

    Thread Starter tkhan

    (@tkhan)

    Hi Dylan,

    Thanks for the feedback managed to do it with the query filters, although I had to opt for giving each user role a hidden taxonomy term and filtering this, as excluding the object ids of users with the role of subscriber worked but slowed my site down drastically.

    Thanks again

    I am now trying to filter a custom post type using custom fields using the following code in a filter, it does not seem to be having any effect. I did read somewhere in the forum that querying by custom fields is not possible at the moment. Is this right.

    ‘add_filter( “geo_mashup_search_query_args”, “add_meta_to_mashup_search” );
    function add_meta_to_mashup_search( $args ) {
    if (isset($_POST[‘colour’]) && !empty($_POST[“colour”])){
    $args[“meta_query”] = array(
    array(
    “key” => “colour”,
    “value” => “white”,
    “compare” => “=”
    ));
    }
    return $args;
    }’

    TKhan

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

The topic ‘restrict user search to specific role’ is closed to new replies.