• Resolved rickybrce

    (@rickybrce)


    Hello,

    Is there a possibility to make it to work with Advanced custom fields plugin? I mean protecting fields in the same way like content protection?
    Now if you protect some page in which are custom fields, only content is protected on that page and not fields.

    Thank you for a great plugin!

Viewing 1 replies (of 1 total)
  • I hope you figured this out, but just in case (and for the next set of people that have this question).

    The Members plugin only filters the_content, so you’ll have to add something into your template file for that element.

    I added this to my page.php template to prevent users from seeing the custom fields that I would otherwise show on that page

    
    if (function_exists('members_can_current_user_view_post')){
      $page = get_queried_object();
      $visible = members_can_current_user_view_post($page->ID);
      if ($visible){
        show_page_fields(); 
      }
    }
    
    • This reply was modified 7 years, 5 months ago by ancawonka.
Viewing 1 replies (of 1 total)
  • The topic ‘Working with ACF plugin’ is closed to new replies.