• Resolved xlaurenstephens

    (@xlaurenstephens)


    Hi Mikko!

    If I understand correctly, you have to keep indexing everytime you update the website and add content?

    Here is my main issue:

    By default, WP allows anyone to go to the searchbar and type in https://url.com/?s= and after the = they can enter whatever they want and it will go thru your site and find it. I am trying to figure out how to shut that off!

    My goal is this, I need to create one page user pages. Each one will be assigned a 7 digit (numbers) code. I need to limit the search to only 7 characters. I do not want people to be able to *fish around* and find pages that they shouldn’t be finding.

    There is nothing wrong with the other pages and they aren’t top secret, I just don’t want someone being able to find them all by fishing for them.

    Thanks!

    https://www.ads-software.com/plugins/relevanssi/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mikko Saari

    (@msaari)

    No, Relevanssi updates the index automatically.

    If you don’t want pages to be found in search, do not include them in the index. It’s that simple. Relevanssi can’t find anything that is not in the index. That’s much easier than trying to block access to one of the core functions of any WordPress site.

    If you want that pages can only be found by code numbers, put those code numbers in a custom field. Name it “code”, for example. Then in the Relevanssi settings, make sure Relevanssi is set to index the custom field “code” and all other indexing options are unchecked, and add the content and title blocking code from this page.

    Then rebuild the index, and you should only be able to find pages with the codes. Again, no need to adjust anything else, just control what goes in the index and you’ll be fine.

    Thread Starter xlaurenstephens

    (@xlaurenstephens)

    Thank you, any ideas on people being able to fish around by using only one or two numbers in their search? Like if they only put in 23, they can find anything with 23 in it such as 1234567 I need to make sure there is a 7 character minimum for the search.

    Thread Starter xlaurenstephens

    (@xlaurenstephens)

    Oh nevermind, I think I see how to do this. Thank you!

    Plugin Author Mikko Saari

    (@msaari)

    Yeah, just disable fuzzy searching.

    Thread Starter xlaurenstephens

    (@xlaurenstephens)

    ok maybe this isnt working like i thought…. do i also need to set it to index PAGES in order for it to pick up the custom fields?

    Plugin Author Mikko Saari

    (@msaari)

    Yes, you must check all the appropriate post types in the post type list.

    Thread Starter xlaurenstephens

    (@xlaurenstephens)

    I really appreciate your help you can consider this solved =)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Limit Searches’ is closed to new replies.