Restricting access to category pages using MemberPress

Category Pages with MemberPress

We recently received a request from a client for a “blog page” on his WordPress site that would only display a specific subset of his blog posts. His site was running MemberPress, a plugin that allows you to grant various levels of access to content by levels of membership (think “bronze,” “silver,” “gold” and “platinum”).

In WordPress parlance, what he was asking for is a category page–one that displays posts designated as being in a specific category. This post is in several categories: “Blogging,” “Check This Out,” “Content Strategy,” “Product News,” and “WordPress.” If I set up a category page for any one of those categories, this post would be included on it.

Category pages are built on the fly and do not exist in the list of existing WordPress pages. Outside of MemberPress this is not complicated to implement–The WordPress core software automatically provides for it. By the way, you can put category pages in menus just like you can pages, and when you click on that menu item, the software will run a quick query and pull all posts of that category and display them on a “page.” When you navigate away from that “page,” it will not be saved. Instead, when you access that category again, a new “page” will be generated.

On a site running MemberPress, implementing a category page with restricted access is a bit more challenging. MemberPress allows you to protect content on existing pages but not for category pages that are built on the fly. Thankfully, MemberPress does, however, allow you to restrict access to posts of a specific category by adding an access “rule.”

On our client’s website, we created a rule in MemberPress to restrict access to posts of a specific category to registered members only. Nonmembers will still be able to click on the menu link to the dynamically generated category page, but they will not see any content on the page (because the content of all posts of that category is only visible to registered members).

2016-10-17T10:29:46+00:00 June 18th, 2014|Content Strategy, Product News, WordPress|