Make a Page Members-Only with Members and AI
One page restricted to the roles you choose, with your message for everyone else, checked with a real user on each side.
Prerequisites
A site connected to WPVibe running Members 3.3 or newer (tested on 3.3.1, free) on WordPress 6.9 or newer, with an administrator account. Read-only mode turned off in Members > Settings > AI (MCP), since this recipe makes a change.
My WordPress site uses the Members plugin. Make [the page, by title or URL] visible only to [who should see it, for example logged-in subscribers, or customers and students]. Show everyone else this message: [the message, or: the default from Members > Settings]. 1. Run discover_abilities with category members. If the abilities this needs are not there, stop and tell me to install or update the free Members plugin (3.3 or newer, on WordPress 6.9 or newer). If only some are missing, tell me they may be switched off in Members > Settings > AI (MCP). 2. Run members/list-restrictable-types. If content_permissions_enabled is false, tell me to turn on Enable Permissions under Content Permissions in Members > Settings first, and stop. Find the page's ID with rest_api GET /wp/v2/pages with status publish,private,draft,pending,future and search set to a word from its title, or slug set to the last part of its URL (use /wp/v2/posts for a post, or the content type's own route for anything else: rest_api GET /wp/v2/types lists them). If several match, list them with title and link and ask me which. Call its ID POST_ID. If its type is not in post_types, tell me Members can't restrict it, and stop. 3. Run members/get-content-access with the post_id and tell me who can see it now. If it already has roles, name them and tell me this replaces them (a role that no longer exists stays on the page, which does no harm). If it has its own message and I asked for the default, tell me its message will be reset. If it inherits roles from a parent page, tell me that giving it its own roles replaces the parent's for this page and the pages below it, so people with the parent's roles can lose access. Then find the pages below it: run rest_api GET /wp/v2/pages with parent POST_ID, per_page 100 and status publish,private,draft,pending,future (page 2 and up while there are more), and again for each page it finds. Run members/get-content-access on each, and leave out any page that has roles of its own (restricted with no inherited_from) and the pages below it: the rest will inherit this restriction. 4. Run members/list-roles and turn who should see it into role slugs. Only those roles see it, plus its author and anyone who can edit it: run members/list-capabilities with group type-page (type-post for a post) and treat the roles that grant edit_others_pages (edit_others_posts for a post, or that type's edit_others capability) as able to see it. Logged-out visitors and logged-in users in any other role get the message. Name the roles with users that are left out and can't edit it (for example customer, student or donor) and how many users each has. Run rest_api GET /wp/v2/settings: if page_on_front is POST_ID, or the page is a shop cart, checkout or account page, warn me that logged-out visitors would lose it. Show me the page's title and link, the roles, the message, and the pages below it that will inherit the restriction, and wait for my yes. 5. On my yes, run members/restrict-content with post_id POST_ID, roles, and message: the one I gave, or an empty string if I asked for the default (leaving message out would keep the page's current message). If it fails with members_read_only, stop and tell me to turn off Read-only mode in Members > Settings > AI (MCP), then ask you again. Note the previous roles and message it returns. 6. Check it: run members/get-content-access with the post_id, and with one of the pages below it that inherit, if there are any. Tell me those pages show the default message from Members > Settings, not the one on this page. For one allowed role and one role left out that has users and can't edit it, run members/list-users-by-role with per_page 20 and pick a user who has only that role and isn't its author (skip a role with no users), then run members/check-user-access with the user and post_id, and tell me what each sees. 7. Ask me to open the page in a private browser window, logged out, and confirm I see the message and not the content. Members hides what WordPress outputs as the page content, so a theme or page builder that shows the page another way can show it anyway. 8. Tell me what changed: the page, the roles, the message, the pages below it that inherit it, and the previous roles and message. Remind me that its author, anyone who can edit it and administrators always see it. Give me the sentence to undo it: if the previous roles were empty, Unrestrict page POST_ID with members/unrestrict-content (you ask me to confirm first); otherwise, Restrict page POST_ID again with members/restrict-content, roles PREVIOUS_ROLES and message PREVIOUS_MESSAGE, with the real values filled in and any role that no longer exists left out (Members keeps those on the page anyway); if no previous role still exists, tell me instead that the page was hidden from everyone but its editors before, that there is no exact undo, and that unrestricting it opens it to everyone. Remind me I can turn Read-only mode back on in Members > Settings > AI (MCP).
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Make a Page Members-Only with Members and AI” recipe from the WPVibe cookbook on my connected site.
You have a page meant for some people only: a members area, a staff handbook, a client resources page. WordPress gives you public, private or password protected, and none of those says let my subscribers in and keep everyone else out.
The AI finds the page, shows you who can see it now, and turns who should see it into Members roles, naming anyone your choice would leave out. After your yes it restricts that one page through Members, sets the message others see, and checks the result with one user who should get in and one who shouldn’t. It changes no other page’s settings, but pages below it inherit the restriction, and the AI names them before your yes.
Turn off Read-only mode in Members > Settings > AI (MCP) first, and back on when you are done. Members hides the page’s content, not its title, menus or the files you link from it, so the AI asks you to check the page logged out. To review everything restricted, use this recipe; without Members, this one does it with a code snippet.
Outcome
The page shows its content only to the roles you chose and your message to everyone else, and you know which child pages inherit it.