How to hide content in WordPress feeds and archives

Sometimes it might be necessary to hide content in WordPress feeds and archives: you might not want all pages and posts to be available or visible to every visitor to your site. A typical situation when this need to hide content may arise is a membership site. An easy to use plugin helps us solve this problem quickly and easily

I recently had to solve an issue for a client: they were asking  how to hide content in WordPress feeds and archives.

A client of mine has a membership area with premium content reserved to paying members. The client asked for the blog posts relative to the membership area to not appear in the public blog feeds and archive.

Out of the box, the excellent plugin I used to build the membership area, MemberPress, won’t hide the premium content – it protects it because you need to be logged in to actually read or download, but it won’t hide the titles from archives and feeds.

As a result, the premium content blog posts would still all appear on the main blog feed and in the archives, even though they are not accessible to un-logged in visitors that click on them.

So this is how to hide specific content from main feed and archives in WordPress.

3. How to hide content in WordPress feeds and archives

First off, I asked Cliff and Paul from MemberPress support how I could hide the restricted content posts from the main blog feed and archive. But oddly enough, they’d never ben asked this question.

So I tried a few plugins that either didn’t quite do what I needed or created a conflict with other plugins – until I stumbled upon the perfect answer to my issue, the Stealth Publish plugin.

The excellent Stealth Publish plugin.
As you can see from the screenshot in the image above, there is a box you can tick in the Publish box when you want the posts to be hidden from the main archive or feeds. And the great thing is that the posts that you stealth publish will NOT be hidden in their own categories feed. So in the case of The Stop Hunter, the premium content page shows all the categories and posts that are hidden in the main blog feed and archives.

The premium content area in The Stop Hunter website shows all the premium content posts that are excluded from the public blog area thanks to the Stealth Publish plugin.
The premium content area in The Stop Hunter website shows all the premium content posts that are excluded from the public blog area thanks to the Stealth Publish plugin.

Job done.

If on the other hand all you need is to exclude a page from appearing in menus, look no further than this simple plugin: Exclude Pages.

If you found this post useful, you might also like these other posts:

How to exclude categories in WordPress

The best way to create custom sidebars in WordPress

Leave a comment