How to Allow Negative Keywords in Your Site

If you add negative keywords to your store pages in Build A Niche Store (aka BANS) v1 or v2 then you need to modify your site to accept negative keywords. This has been corrected in v3 so you only need to follow these instructions for v1 or v2 sites.

For those who don’t know, negative keywords are phrases you don’t want results for. Let’s say your site is for apples but auction results include apple ipods and you don’t want this. In your search phrase for a store page you would enter any of the following:

  • -ipod (to prevent results with the word ipod from showing)
  • -ipod* (to prevent results that start with the word ipod from showing, such as ipods)
  • -(ipod, another unwanted keyword) (add the parenthesis to exclude multiple keywords as any words inside the parenthesis with the – outside will be excluded)
  • -(ipod*, another unwanted keyword)

If you add negative keywords to a v1 or v2 site but don’t add this mod then your unwanted keywords will be filtered out on the first page of auction results but all subsequent pages will show the unwanted keywords.

 

My instructions to allow negative keywords on your site

Step One
 Open the index.php for your site (click here if you don’t know how to do this).
  
 Save a copy of the original code (click here for instructions on how to do this).
Step Two
 Search for the $front->q = str_replace(“-”,” “,$q); tag. Replace this tag with the contents of negative-keywords.txt.
  
 Save changes and view your site for errors.
.

Rochelle

7 Responses to “How to Allow Negative Keywords in Your Site”

  1. [...] Also, if you use negative keywords on your v1.x or v2.x stores then you need to add a mod to your sites. You can read my instructions to add this mod here. [...]

  2. [...] Twelve Add the How to Allow Negative Keywords [...]

  3. List of keywords says:

    Hi, I wonder if you know how to add more keywords to your site. From UI I can just add 10 or so for each page. I am looking for a way to add my 1000 keywords per page. So I wonder:
    1. Is it possible?
    2. If it is possible how can I do this?
    Thanks,
    mazukis

  4. Rochelle says:

    Mazukis,

    My apologies but I’m not sure what you mean by “From UI I can just add 10 or so for each page.” I don’t know what UI is. Please clarify so I can give a better answer to your question.

    If you are wanting to add keywords to each BANS page via your site’s Admin then you are limited, but the limit is to characters, not words. I just checked and found that the ‘Search Query’ box will save up to 255 characters, so anything you enter beyond 255 will not be saved. You won’t be able to add 255 keywords to the search query.

    However, I’m not positive that’s what you asked about so please let me know if I’m answering wrong.

    Rochelle

  5. List of keywords says:

    Rochelle, sorry, UI stands for User Interface, meaning that you are doing it through your amin tool, not in your HTML or any other code.
    So the Admin tool allows you to enter 255 charachters, but I’ve fot over 1000 keywords I’d like to utilize, they are all competative. Through admin tool it is impossible to implement, so I was wonering if I can do you through code
    Thanks,
    Mazukis

  6. Rochelle says:

    Mazukis,

    Thank you for clarifying. I don’t know of any code that will let you add more keywords. That being said, I still not sure exactly where you want to add your keywords. If you want to search for these terms then you are limited to 255 characters, as I stated before. But, if you want to add them to the keyword meta tag then I think you have no limits. You can add them there.

    A word of advice. 1000 keywords is a lot to add to a single page. Search engines, such as Google, may view this as keyword stuffing, which is something spammers do. As a result this could lower your page ranking. You might be better off spreading your keywords around to different pages, or creating content pages that make use of the keywords in the text you add to them.

    Rochelle

  7. List of keywords says:

    Rochelle, thanks for your advice, I appreciate it!
    Mazukis

Leave a Reply