Skip to:
Content
Pages
Categories
Search
Top
Bottom

members search not working (resolved)

  • @bennett-burks

    Member

    so I added “ into the header.php of a theme my client is using. However when I run a members search, it almost always returns a “not found” error. Anyone encountered this problem before? Have you been able to get members search to work, and if so how? Sometimes it does return results, but it seems to only when I’m actually on the member directories page, and I need it to work properly on all pages and posts.

Viewing 4 replies - 1 through 4 (of 4 total)
  • @r-a-y

    Keymaster

    You’ll probably want to pass your search term from your form into your own members loop with the “search_terms” parameter:
    https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-members-loop/

    @bennett-burks

    Member

    I’m not seeing from what’s on that page how I would go about that…. part of the problem to is I’m not seeing what file buddypress members search function is actually defined in, seeing that would probably help. But I’m digging around and not finding the file.

    Right now the search is going to :http://mydomain.com/?s=username&members_search_submit=Search

    It seems that it should instead be http://mydomain.com/members/?s=username
    I imagine I could change this in whatever file defines that search function.
    Am I at least on the right track as far as that goes? Or way off?

    @r-a-y

    Keymaster

    Using the latter option would work as well – having your form submit your search term directly to the members directory.

    That’s probably the easiest thing to do.

    @bennett-burks

    Member

    EDIT:
    Thanks. Think I found where the form is originally defined too, so hopefully just tweaking that will work.

    OK so it definitely works!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘members search not working (resolved)’ is closed to new replies.
Skip to toolbar