Some pages should exist but not be findable by search: a page that is only meant to be reached from another page, an old policy kept for reference, a holding page. Search is provided by the Relevanssi Premium plugin, and it is Relevanssi’s controls that hide things. The theme adds one of its own for staff. Nothing here unpublishes anything: a hidden page can still be reached by its link, from menus and from the A to Z.
Hide a page from search from its edit screen
- Edit the page, task, news story or other item.
- Find the Relevanssi box in the right-hand column of the edit screen.
- Under Exclude this post, tick Exclude this post or page from the index.
- Select Update.
The item is removed from the search index as soon as it is saved. Untick the box and update to bring it back. The same box has a second option, Ignore post content in the indexing, which keeps the page searchable by its title and keywords but not by anything in its content.
The box is only shown to Editors and Administrators, and only on content types that Relevanssi indexes. If nobody can see it, an administrator should check that Hide Relevanssi meta boxes is not ticked in Relevanssi’s Admin & Dev settings.
Hide a page from search using Quick Edit
On the list of pages, tasks or other content, hover over the item and select Quick Edit. The Relevanssi options, including the same Exclude this post or page from the index tick box, are in the Quick Edit panel, so several items can be hidden in a minute without opening each one. The list screens also have a Relevanssi column showing which items are excluded or pinned.
Hide a page from searches for particular words only
In the same Relevanssi box, the text area under Exclude this post takes a comma-separated list of words or phrases. The page stays in the index but is dropped from the results whenever a search contains one of those words. Use it when a page keeps appearing for a term it is not the answer to. The opposite, pinning a page to a term, is described in Promote items in search results.
Hide a whole category or content type
Go to Settings, then Relevanssi Premium, then the Searching tab.
- Category exclusion: tick the categories whose items should never appear. Items keep their place in the index; they are filtered out of results.
- Exclude specific IDs: a comma-separated list of post IDs, for the odd page when the edit screen route is not convenient.
To keep a whole kind of content out of search, for example team news, untick it under Post types on the Indexing tab and rebuild the index. Intraverts and ultraverts are never in search whatever the settings.
Hide a document from search
Documents from the media library only appear in search results when Enable attachments filter is on in Options, then Search, and Relevanssi is indexing attachments (see Search options). To hide a single document, go to Media, then Library, open the file, select Edit more details and tick Exclude this post or page from the index in its Relevanssi box.
One thing to know: when a file is attached to a page through the page’s Documents panel, the file’s title is indexed as part of that page. A search for the file’s name will still find the page, which is usually what you want. To stop that, rename the file or remove it from the panel.
Hide a member of staff from search
Staff are not hidden through Relevanssi. Edit the person’s profile under Users and tick Hide from directory. They disappear from the staff directory, from search results and from the search index. This is the right setting for generic or service accounts, and for people who have left but whose account must stay. See Setup the staff directory.
What does not need hiding
- Drafts, pending, scheduled and binned items are not in search. Unpublishing a page is often the simpler answer.
- Intraverts and ultraverts are never searched.
Hiding from search does not hide from the AI assistant
If the intranet uses Agento Intelligence, the assistant has its own index and its own rules about what goes into it, set on its Settings tab. Hiding a page from search does not remove it from the assistant, because the page is still on the intranet for anyone who can browse to it. To keep something out of the assistant, use the assistant’s own settings, or take the page off the intranet. See Setup Agento Intelligence.
Find out what is hidden
The (Govintra) Content report plugin lists every item with a Hide in search column, and the Relevanssi column on each content list shows exclusions and pins, so a periodic check for pages hidden by mistake is quick.
