Can I exclude an article from search results? Follow



  • Avatar
    Alison Ford

    I'm trying to add an article in draft mode, but I cannot see this option.  In edit mode there is no draft/published in the top right as indicated in the screen shot above.


    How do I control draft/published?

  • Avatar
    Jessie - Community Manager

    Hi Alison!

    As long as you're in edit mode, that option should definitely show up for you. Can you post a screenshot of what you're looking at?

  • Avatar
    Dave Voll

    I see there is mention of a jQuery code to hide a document from search results, would someone be able to give more info on how to accomplish this? I have an article that is hidden but published and viewable by anyone and hiding it from the search is my last thing to figure out so that it's only available to those with the link.

  • Avatar
    Chris Wilson

    Hi Dave!

    I too am trying to create an article that is published and only accessible if you have the link for it, and is not searchable.  Curious how you accomplished the first part of not making it appear in any categories/sections, did you use a div tag or something?  Thanks in advance for your help!

  • Avatar
    Jessie - Community Manager

    Hey, Dave and Chris!

    I did some poking around to see if anyone had actually posted code for this, and I didn't find anything for this specifically.

    However, I did find a tip from one of our Moderators, Andrea, with code to hide an article's author from search results

    My thought is that this code might be able to serve as a jumping off point, with some strategic changes made to hide the article completely.

    Keep us posted on how you get on! If you get stuck, let us know and I'll try to find a Moderator who can help you troubleshoot - we've got a couple folks who are good at this kind of thing. And if you do get it figured out on your own, it would make a great contribution for our Tips & Tricks section. :)

  • Avatar
    Ian Maison

    Hi, this does not really work for us as we don’t want to enforce our users to have to sign in, our restrict them to being part of an Organisation. We simply want to hide the articles from Category/Section/Article view, which we’ve done with curlybars, and then simply not have the hidden articles return in the Help Centre search results.

    Is there no way to do this?

  • Avatar
    Jessie - Community Manager

    Hey Ian!

    I can't speak to how it would work to restrict search results with JS, but I imagine you could probably figure out a way to do it.

    That said, it would be much easier to just restrict the individual sections you don't want your logged-out users to see. You can restrict them by tag or org, which will automatically hide them from logged-out users. No need to force anyone to log in or anything.

Please sign in to leave a comment.

Powered by Zendesk