Title: Restrict posts by database
Last modified: June 30, 2021

---

# Restrict posts by database

 *  Resolved [Andrea](https://wordpress.org/support/users/aneises/)
 * (@aneises)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/restrict-posts-by-database/)
 * Greetings
 * I want to restrict many posts (one by one) by Profile Builder.
 * Since there are so many, it would be very tedious to do this via the frontend.
   Can I do this via the database or how are the settings saved in the database?
   Only registered users should be able to access the posts.
 * KR, Andrea

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Georgian Cocora](https://wordpress.org/support/users/raster02/)
 * (@raster02)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/restrict-posts-by-database/#post-14615204)
 * Hello [@aneises](https://wordpress.org/support/users/aneises/),
 * This can be done by adding some post meta to these posts. You say you want them
   restricted for logged in users, so you just need to add a post meta with the 
   key `wppb-content-restrict-user-status` and value as `loggedin`.
 * The type of restriction will be the default one (from PB -> Settings -> Content
   Restriction). You could also set that on each post by adding the key `wppb-content-
   restrict-type` and values `message` or `redirect`.
 * Regards.
 *  Thread Starter [Andrea](https://wordpress.org/support/users/aneises/)
 * (@aneises)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/restrict-posts-by-database/#post-14615257)
 * Thanks [@raster02](https://wordpress.org/support/users/raster02/) that did the
   trick!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Restrict posts by database’ is closed to new replies.

 * ![](https://ps.w.org/profile-builder/assets/icon-256x256.png?rev=2961144)
 * [User Profile Builder - Beautiful User Registration Forms, User Profiles & User Role Editor](https://wordpress.org/plugins/profile-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/profile-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/profile-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/profile-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/profile-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/profile-builder/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Andrea](https://wordpress.org/support/users/aneises/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/restrict-posts-by-database/#post-14615257)
 * Status: resolved