Title: Restricting custom fields
Last modified: September 5, 2021

---

# Restricting custom fields

 *  Resolved [ryfre](https://wordpress.org/support/users/ryfre/)
 * (@ryfre)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/restricting-custom-fields/)
 * Hello.
 * I have a filter set up, which hits on “POSTS with category X”. This restricts
   the content properly, but not custom fields from the REST API.
 * Is it possible to set this up so that I can actually hide custom post fields (
   from ACF) from the REST api? As is, I’m able to fetch the posts even if they 
   are restricted and read the custom post fields. The `content.rendered` field 
   is protected properly, just not the ACF fields.
 * I’m also using “ACF to REST API” to actually expose ACF to the REST API.

Viewing 1 replies (of 1 total)

 *  Plugin Support [mark l chaves](https://wordpress.org/support/users/mlchaves/)
 * (@mlchaves)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/restricting-custom-fields/#post-14846563)
 * Hi [@ryfre](https://wordpress.org/support/users/ryfre/),
 * Thanks for your question.
 * As you know, built-in custom fields and ACF fields aren’t available via REST 
   API by default. Furthermore, the **ACF to REST API** plugin alters the JSON response
   to expose ACF fields to the REST API.
 * So, restricting ACF fields and getting involved with how a 3rd-party plugin alters
   the JSON is out of **Content Control’s** scope. Sorry for the not-so-great news.
 * You might want to ping the author of **ACF to REST API** to see what they can
   do on their side if you haven’t yet.
 * We’re going to mark this thread as resolved. But, please feel free to start a
   new thread any time you have questions about the **Content Control** plugin.
 * Have a great day 🙂
 * Mark
    -  This reply was modified 4 years, 9 months ago by [mark l chaves](https://wordpress.org/support/users/mlchaves/).
      Reason: Typo

Viewing 1 replies (of 1 total)

The topic ‘Restricting custom fields’ is closed to new replies.

 * ![](https://ps.w.org/content-control/assets/icon-256x256.gif?rev=2968535)
 * [Content Control - The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More](https://wordpress.org/plugins/content-control/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-control/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-control/)
 * [Active Topics](https://wordpress.org/support/plugin/content-control/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-control/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-control/reviews/)

## Tags

 * [ACF](https://wordpress.org/support/topic-tag/acf/)
 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [rest](https://wordpress.org/support/topic-tag/rest/)
 * [restrict](https://wordpress.org/support/topic-tag/restrict/)

 * 1 reply
 * 2 participants
 * Last reply from: [mark l chaves](https://wordpress.org/support/users/mlchaves/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/restricting-custom-fields/#post-14846563)
 * Status: resolved