Restricting search results
AnsweredI want to hide certain articles from my help centre and make them only accessible via a link. I've hidden them from the homepage and the articles lists in sections using the 'isnt helper' but I can't see how to exclude them from search results. Is there a way to do this?
-
Hi Louise Moghaddam, :)
you can try this, check article and then hide that from search results page:
$(".results-list-item-link:contains(What are these sections and articles doing here?)").parent().parent().hide();
$(".results-list-item-link:contains(What are sections?)").parent().parent().hide();
$(".results-list-item-link:contains(What are categories?)").parent().parent().hide();Thanks
-
Thanks Ifra, sorry, I don't understand what you mean. Could you outline the exact steps please? Many thanks!
-
Loiuse, the given code is
$(".results-list-item-link:contains(What are these sections and articles doing here?)").parent().parent().hide();
This is my article title in the code which I want to hide on search results page:
What are these sections and articles doing here?
So, you only need to remove my article title and add your article title one by one in the code. I'm doing this for my three articles only.
$(".results-list-item-link:contains(What are these sections and articles doing here?)").parent().parent().hide();
$(".results-list-item-link:contains(What are sections?)").parent().parent().hide();
$(".results-list-item-link:contains(What are categories?)").parent().parent().hide();1). What are these sections and articles doing here?
2). What are sections?
3). What are categories?
you just add the given code to the scritp.js file and replace my article's title with yours which you wanna exclude.
-
It's worked! Thank you for helping Ifra, apologis for being such a luddite!!
Please sign in to leave a comment.
4 Comments