Requiring Authentication for Parts of Wordpress Site

I have a site that I've inherited and my user base is requesting a feature. The page is primarily informational about a non-profit (calendar of events, contact form, etc.) but they'd like to add a page plus some posts that contain information which only a small group of people have access. This area of the site contains sensitive information (personally identifying but nothing about payments etc.). It's more along the lines of monthly meeting notes from the board of directors.

I've looked around and most plugins or solutions are seen are geared either toward password protected post content (which is not what I need) or password protecting the entire site (which is not what I need).

Before I begin looking at rolling my own plugin, is there something similar out there that might work?

Topic authorization authentication Wordpress

Category Web


If you're looking to restrict the ability to view pages or posts to those that have a specific role, you can use the method described here: https://wpti.ps/check-if-user-has-specific-role-or-capability-in-wordpress/

You could create a custom role for those that need access and then check for that role using the custom function in the link above. If going that route, I'd implement a custom post type as well specifically for that type of content, then create a template for the post type that ensures that content is always displayed with the role check.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.