• hi guys i recently pourchaced BuddyPress & Youzify trying to build kind of social media website.

    my issue is that i would like to give the users options to search for specific posts/comments people posted.

    what works – example:
    username: Ben posted “hi josh, nice to know you like PIZZA”
    in the search bar search for “pizza” and it will show thee user this comment/post.

    what doesn’t work (and i want to fix!): “hi josh, NICE to know you like PIZZA”
    a search for “nice pizza” should show this post as well.

    any code needed? ajax? maybe plugin? maybe simple or complicated solution, anything will be highly appreciated!

    https://youtu.be/ejhyoXEK0FU
    i made a video to explain better

    Thanks! ??

    • This topic was modified 3 years, 9 months ago by benb1.
    • This topic was modified 3 years, 9 months ago by Jan Dembowski.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    The default search isn’t very sophisticated. Try out a few of the advanced search plugins, see if any meet your need.
    https://www.ads-software.com/plugins/search/advanced+search/

    If all else fails, you could custom code a solution, but that can get rather involved, depending on the specific need.

    Thread Starter benb1

    (@benb1)

    thanks for the help however, none of them work

    # the only thing i need is a search with multyiply keywords it shouldn’t be that unique
    i dont care even if it has seperator like

    Search: pizza; recipe;

    someone?

    Moderator bcworkz

    (@bcworkz)

    I think I misinterpreted your OP. You want posts that contain BOTH “nice” and “pizza” with search term “nice pizza”? That’s the default condition. example.com/?s=”nice pizza” should return posts with your example phrase.

    It seems your site already has code corrupting the default behavior, which may explain why other plugins failed to work. Try deactivating all plugins and switching to twenty* default theme. Search should behave as you wish.

    Identify the guilty module by restoring them one at a time until search behavior changes.

    Thread Starter benb1

    (@benb1)

    @bcworkz Hi!
    So i tried for days to fix it and stil nothing…

    swiching themes also didnt help.

    ill give another example – with BuddyPress we have an option to Search for posts (activity page).
    so basicly if someone posted:

    “Hi olivia, my name is Ben and i like the color red.”

    and i search “olivia red”
    i want the post to appear.

    at the moment:
    if i search “olivia” the post appears.
    if i search “red” the post appears.
    if i search “color red” the post appears.
    if i search Hi olivia” the post appears.
    however, “olivia red” the post is not showing.

    how to fix withing the code: split the search string to words searching 1 word at the time and showing the results only of post who have both words “olivia” & “red”

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘search for every post/comment’ is closed to new replies.