For a project, I needed a way to easily restrict access to content on a WordPress website on a per user basis.
There’s loads of existing plugins that over complicate this significantly, so I thought I would test Gemini‘s capability at writing WordPress code.
The result is Content Restrictor – and it works very nicely for my needs:
- Pages and posts have a check box – should this be restricted or not?
- Each user page now has a section with a list of all the restricted pages, and if checked, that user can view the content, else they get a message
- The message can be customised in the settings
- There’s also a short code to display all the restricted pages that the current user has access to
- Admins accounts bypass the restrictions entirely
If it works for you tool, feel free to grab it from GitHub!
I find myself vibe coding WordPress plugins rather than installing them from third parties. Used to do it with ChatGPT in the conversational interface but Google Jules just leaves me speechless all the time (on which ICYMI – https://bm.wel.by/2025/06/03/vibe-coding-fireworks-and-the-mortar-of-government/)