# Checking Patreon level while using Direct Unlocks

**URL:** <https://www.patreondevelopers.com/t/checking-patreon-level-while-using-direct-unlocks/2245>\
**Category:** Wordpress Plugin\
**Created:** [September 13, 2019, 5:38pm UTC](https://www.patreondevelopers.com/t/checking-patreon-level-while-using-direct-unlocks/2245 "2019-09-13T17:38:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sounds\_Like\_An\_Earfu](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@Sounds\_Like\_An\_Earfu](https://www.patreondevelopers.com/u/Sounds_Like_An_Earfu)\
**Post date:** [September 13, 2019, 5:38pm UTC](https://www.patreondevelopers.com/t/checking-patreon-level-while-using-direct-unlocks/2245/1 "2019-09-13T17:38:56Z")

</div>

Hi everyone,

I am successfully locking specific parts of my theme code using the method outlined here: [https://paper.dropbox.com/doc/Patreon-WordPress-how-to-lock-any-part-of-your-Website-dqneEVjvuYrPbkEJfOuhG](https://paper.dropbox.com/doc/Patreon-WordPress-how-to-lock-any-part-of-your-Website-dqneEVjvuYrPbkEJfOuhG)

However, that demo uses $7 as an example Patreon level that must be met to ‘unlock’ the content. How can I check the “Patreon Level” that is set for each individual post (via the metabox that the plugin adds to the Wordpress editor) rather than being stuck with a hardcoded $7 unlock?

E.G.

- Get all posts
- Loop through all posts
- For each: check the Patreon Level that has been set via the plugin’s metabox
- Run custom locking code using the specific Patreon Level for each post to decide whether locked or not (rather than the hardcoded $7)

Thanks for any help!

Christopher

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [September 16, 2019, 2:50pm UTC](https://www.patreondevelopers.com/t/checking-patreon-level-while-using-direct-unlocks/2245/2 "2019-09-16T14:50:36Z")

</div>

For a single post:

- Just get the current single post id.
- Get patreon-level meta’s value for that post id
- Use that patreon-level meta value for lock $ amount instead of 7

That should do it for single posts.

---

<div class="post-metadata">

**Author:** ![Sounds\_Like\_An\_Earfu](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@Sounds\_Like\_An\_Earfu](https://www.patreondevelopers.com/u/Sounds_Like_An_Earfu)\
**Post date:** [September 16, 2019, 3:06pm UTC](https://www.patreondevelopers.com/t/checking-patreon-level-while-using-direct-unlocks/2245/3 "2019-09-16T15:06:48Z")

</div>

Thanks for this, I guess that’s my question… is there documentation of all the meta values the free plugin adds anywhere? I couldn’t seem to find the proper meta value to call?!

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [September 16, 2019, 3:44pm UTC](https://www.patreondevelopers.com/t/checking-patreon-level-while-using-direct-unlocks/2245/4 "2019-09-16T15:44:13Z")

</div>

"patreon-level’ is the meta name as i mentioned in my earlier post, sorry.

We have hook and filter and function documentation, however we dont have one that lists metas yet.
