GEO my WP Support

Use this forum for technical support and general questions related to GEO my WP plugin and its core add-ons only. For technical support and general questions related to any of the premium extensions please open a new premium support ticket.

[Not resolved]current user showing in search results

Home Forums Support current user showing in search results

This topic contains 3 replies, has 2 voices, and was last updated by  gnana 2 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #56293

    gnana
    Participant

    I using search form with buddypress members page user list.

    This search results also showing current logged in user in list.

    #56296

    Eyal Fitoussi
    Keymaster

    Hi,
    Indeed, at the moment, all members including the logged in user ID will show in the search results.

    I will probably add an option to exclude the logged in user in GEO my WP 3.0, since it has been mentioned before.

    Until then you will need to write a custom script that will exclude the current user from the search results.

    #56316

    gnana
    Participant

    could you share the script

    #56318

    gnana
    Participant

    In this file
    wp-content/plugins/geo-my-wp/plugins/friends/includes/gmw-fl-search-query-class.php

    added below line

    if ( bp_has_members( $this->form[‘query_args’].’&exclude=’.get_current_user_id() ) ) {

    This will exclude current user from list ‘&exclude=’.get_current_user_id()

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.