# How to lock only one divi module on a public webpage?

**URL:** <https://www.patreondevelopers.com/t/how-to-lock-only-one-divi-module-on-a-public-webpage/4658>\
**Category:** Wordpress Plugin\
**Created:** [August 17, 2021, 2:56pm UTC](https://www.patreondevelopers.com/t/how-to-lock-only-one-divi-module-on-a-public-webpage/4658 "2021-08-17T14:56:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/alexandre/32/1777_2.png) [@Alexandre](https://www.patreondevelopers.com/u/Alexandre)\
**Post date:** [August 17, 2021, 2:56pm UTC](https://www.patreondevelopers.com/t/how-to-lock-only-one-divi-module-on-a-public-webpage/4658/1 "2021-08-17T14:56:25Z")

</div>

Hello,

I would love to restrict the access to Patron only for some part of my website.

I use entierly Divi Builder and only pages (No posts).

On this page for example i would like to have the complete page public, except the statistics tables module. Is there a way to do that?

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/patreondevelopers/original/2X/1/1e6fe675c299a28fe9136fb2a9a218b9a15057b6.jpeg)

> **[CX-9 Class and Attachments | Warzone Loadout](https://warzoneloadout.games/warzone-loadout/smg/cx-9-loadout/)**
>
> Find here the best attachments for the CX-9 smg in Warzone. This gun has made some wave in the past, but is it good?

Then the idea for me would be to replicate this on all pages that have stats (more than 50).

I already have the patreon plugin installed and it works for me to remove ads.

Sincerely,  
Alex

---

<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:** [August 17, 2021, 6:34pm UTC](https://www.patreondevelopers.com/t/how-to-lock-only-one-divi-module-on-a-public-webpage/4658/2 "2021-08-17T18:34:23Z")

</div>

Patron Plugin Pro (a premium addon to Patreon WordPress) allows parts of your posts to be gated and unlocked, but when you put the Divi module inside that gating shortcode, it may hide entire module until the patron unlocks the content. But that’s probably what you want.

If that module is generated with code, you would need to use custom gating code to wrap it in:

> **[Patreon WordPress - how to lock any part of your Website](https://paper.dropbox.com/doc/Patreon-WordPress-how-to-lock-any-part-of-your-Website-dqneEVjvuYrPbkEJfOuhG)**
>
> How to lock any section, page, type of content, or template section through the code (If you are using Patron Plugin Pro, use the code at instead!)

---

<div class="post-metadata">

**Author:** ![Alexandre](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/alexandre/32/1777_2.png) [@Alexandre](https://www.patreondevelopers.com/u/Alexandre)\
**Post date:** [August 17, 2021, 8:30pm UTC](https://www.patreondevelopers.com/t/how-to-lock-only-one-divi-module-on-a-public-webpage/4658/3 "2021-08-17T20:30:04Z")

</div>

Thank you for your answer.

I tried to use the gating code but it does not seems to restrict the access. I tried with multiple devices not loged into Patreon and still was able to see the content.

Do i need to instal a library or something to get this patreon\_Gate ?

Here is my code. I use a shortcode for the table and it’s showing correctly, but as if i was a patron.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/patreondevelopers/original/2X/7/77d0b13253505ea9f44b99fc719aea6d848ec7e3.png)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/patreondevelopers/original/2X/0/0ba0d21fbeaa4b6453b91ad9bdda48078fe2b138.png)

---

<div class="post-metadata">

**Author:** ![Alexandre](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/alexandre/32/1777_2.png) [@Alexandre](https://www.patreondevelopers.com/u/Alexandre)\
**Post date:** [August 17, 2021, 8:35pm UTC](https://www.patreondevelopers.com/t/how-to-lock-only-one-divi-module-on-a-public-webpage/4658/4 "2021-08-17T20:35:37Z")

</div>

Well i actually did not do anything and now it works!

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/patreondevelopers/original/2X/5/5fc896e6fd49d144872ff2868864bf92797e11ae.png)

**Last question: how can i customize the message text, color and center it?**

---

<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:** [August 24, 2021, 5:39am UTC](https://www.patreondevelopers.com/t/how-to-lock-only-one-divi-module-on-a-public-webpage/4658/5 "2021-08-24T05:39:29Z")

</div>

Likely it was either your cache or you have pasted the code in the wrong place before. But if you just c/ped PHP code into your post and it was automatically evaluated thanks to a plugin you have or something, that’s not really advisable - better place the code into page or post’s template.
