Title: Custom code
Last modified: August 30, 2016

---

# Custom code

 *  [erickbstelpaso](https://wordpress.org/support/users/erickbstelpaso/)
 * (@erickbstelpaso)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/custom-code-2/)
 * Hi,
 * I’m transferring a non-wordpress site to a wordpress site. I’m almost done, except
   I need to restrict access per post. I know that this can be done trough the admin,
   but I would really like to insert the appropiate rows directly to the db, since
   I have over 5000 posts on the previous site. I thought that this plugin would
   restrict access on the postmeta table, but I can’t seem to find anything important.
 * Thanks!
 * [https://wordpress.org/plugins/membership/](https://wordpress.org/plugins/membership/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * (@wpmudev-support4)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/custom-code-2/#post-6814678)
 * Hey there erickbstelpaso,
 * How are you doing today?
 * Did you consider using Category Protection add-on instead of Individual Post 
   so you can protect single posts by selecting their categories instead of all 
   posts?
 * Could this work for you?
 * I’m not sure how this can be done in the database but in case you’re a developer
   you should be able to find more information in the plugin developer docs which
   you can find in Membership 2 -> Help -> API Docs.
 * Best regards,
    Bojan

Viewing 1 replies (of 1 total)

The topic ‘Custom code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/membership_b8cdaa.svg)
 * [Membership 2](https://wordpress.org/plugins/membership/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/membership/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/membership/)
 * [Active Topics](https://wordpress.org/support/plugin/membership/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/membership/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/membership/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Bojan Radonic – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support4/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/custom-code-2/#post-6814678)
 * Status: not resolved