Simple Content Restrictor Plugin

Origin Story I had a number of emails from people trying to restrict content in various ways. One person wanted to restrict access because they were editing previously published content. Another person wanted more of a traditional membership-style option with the ability to restrict certain content based on user roles. I looked at some of the plugins out there but felt that building something a little less corporate1 would be pretty easy. It’ll likely evolve as I get some people using it but it’s here now if you want to mess with it. Making It This plugin uses the Advanced Custom Fields plugin as it saves me tons of hassle building custom field interfaces. ACF Stuff First, these two pieces enable me to sync up ACF field data without the drama of import/export or hard coding it into PHP.2 Now, I started off hand-writing the user levels as items. While easy, it felt wrong because there might be other user levels created by other plugins and they’d end up left out. I realized I could just add the user roles automatically like so. This will list all the user roles on the site as options. Filtering the Content My original idea was that I could just use use WP’s content filter. That is what I did but things got more […] […]

Read More…

Simple Content Restrictor Plugin

Origin Story I had a number of emails from people trying to restrict content in various ways. One person wanted to restrict access because they were editing previously published content. Another person wanted more of a traditional membership-style option with the ability to restrict certain content based on user roles. I looked at some of the plugins out there but felt that building something a little less corporate1 would be pretty easy. It’ll likely evolve as I get some people using it but it’s here now if you want to mess with it. Making It This plugin uses the Advanced Custom Fields plugin as it saves me tons of hassle building custom field interfaces. ACF Stuff First, these two pieces enable me to sync up ACF field data without the drama of import/export or hard coding it into PHP.2 Now, I started off hand-writing the user levels as items. While easy, it felt wrong because there might be other user levels created by other plugins and they’d end up left out. I realized I could just add the user roles automatically like so. This will list all the user roles on the site as options. Filtering the Content My original idea was that I could just use use WP’s content filter. That is what I did but things got more […] […]

Read More…

Privacy Statement