Removing items search page?

I'm working on a theme which has no use for the advanced search available at items/search.

Is it possible to exclude this (or any) page from the theme, going to the 404 page if that URL was used?

These are kinda different questions.

On one hand, there's just removing the link from where it appears in the theme, but leaving the advanced search page there only if someone knows enough about Omeka to find it.

On the other hand, there's removing the link, AND making it inaccessible with the 404 page.

Which is the effect you are aiming for?

To clarify - I want to remove that page from the theme entirely, so anyone surfing to items/search will be shown the 404 page.

From what I see, making a true 404 response looks pretty tricky, and would require something in a plugin, rather than a theme. Alternatively, something in .htaccess might do it.

If there's not a pressing reason to make it 404, I'd say the most efficient solution is just to remove links to that search page from your theme.