I am using a plugin(members) that will block my Custom Post and only show it to Roles that I select. The issue is that I’m trying to use the Repeater field on that CPT, and this content is not blocked because my plugin is only blocking the_content portion of the page. is there any way to use a function to add these fields to the the_content portion of the CPT query using a filter or something? Thanks in advance!
I don’t think wordpress has a built in method of adding capabilities to CPTs after they have been created.
That said, there’s a post here: http://simonwheatley.co.uk/2012/07/capabilities-for-custom-post-types-in-wordpress/ that looks like it explains how to do that through the $GLOBALS
array.
Hi @nickfmc
The plugin you use much provide some kind of function which you can run on the page template which will return true|false depending on the current post_Type adn the logged in user.
You can use this to create your own if statement around your repeater field code.
Thanks
E
Thanks Elliot, I was going that direction too, then I realized I could do everything I needed with ACF – this worked perfectly, do you have an example like this in the code snippets cause it works like a charm for basic content access http://www.themightymo.com/2013/05/20/how-to-limit-access-to-wordpress-pages-by-specific-user/