• Resolved kastriebel

    (@kastriebel)


    Love the plugin. I have categories attached to pages {plugin: Category Tag Pages) and protect the “private” category. However, the page template also shows advanced custom field data. They suggest this can be protected (for simple password protected posts) by wrapping that code in
    if (post_password_required()){}

    Is there a similar function I can use with plugin?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kastriebel

    (@kastriebel)

    Plugin Author jojaba

    (@jojaba)

    I’m not sure I understood what you want to do.
    You can find the password impacted categories by using this code (look into the access-category-password.php file) :

    $acpwd_options = get_option('acpwd_settings_options');
    $impacted_categories = (isset($acpwd_options['impacted_categories'])) ? $acpwd_options['impacted_categories'] : array();
    // looking if the category is in the password protected categories array
    if ( in_category($impacted_categories) ) {
    // Do something
    }
    • This reply was modified 5 years, 2 months ago by jojaba.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘protect Advanced custom field data on page’ is closed to new replies.