Support

Home Forums Event Espresso Premium Restrict content pro – Restrict content metabox

Restrict content pro – Restrict content metabox

Posted: July 25, 2017 at 3:12 am

Viewing 10 reply threads


Fatmama

July 25, 2017 at 3:12 am

Hi,

Is there a way to enable the Restrict content pro Metabox on the eventpages or is there another way to easily restrict custom user roles to view an event?

Thanks in advance!
Kind regards,
Demi


Fatmama

July 25, 2017 at 3:18 am

And now with working Img!

Thanks!

Schermafbeelding 2017 07 25 om 11 05 53


Josh

  • Support Staff

July 25, 2017 at 1:59 pm

Hi there,

You can add some code to your site to use Restrict Content pro with Event Espresso events:

https://gist.github.com/joshfeck/60fdc20490effadf80cd45ca0b841253

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


Fatmama

July 26, 2017 at 3:41 am

Hi,

Thanks for the reply! I’ve added the code to the top of the functions file but the metabox doesn’t show?

Is there something els I need to do to make it work?

Thanks!


Josh

  • Support Staff

July 26, 2017 at 8:10 am

May I ask which functions file? Was it within a plugin or within a theme folder? If a plugin is the plugin activated?


Fatmama

July 27, 2017 at 5:28 am

Hi,

I’ve added it to the Child theme’s Functions file.

Thanks!


Tony

  • Support Staff

July 27, 2017 at 5:32 am

Can you try adding it to a custom functions plugin, Josh provided a link to a tutorial on creating one above.


Josh

  • Support Staff

July 27, 2017 at 1:11 pm

Oh hey sorry! The code I gave you was for the Restrict Content (not Pro) plugin. Here’s a different gist that’s for Restrict Content Pro:

https://gist.github.com/joshfeck/12610ce3e55737f05b4afd6e037a0140

It’d be best to test this code thoroughly with your specific set up. The code has been tested but only to see if it would restrict content from non-members.


Fatmama

July 28, 2017 at 1:58 am

Hi,

Thanks Josh & Tony for both your answers! The code Josh linked did the trick. I’ll do some more testing to see if it actually works.

One more question. Is there also a way to restrict a ticket to a user role?

Thanks a lot!


Josh

  • Support Staff

July 28, 2017 at 6:28 am

The WP User Integration add-on has a feature that allows you to set a capability on a ticket. For example if user role x has capability y, and you set ticket z‘s capability requirement to require capability y, then user x can get that ticket. Users accounts without capability y (and anyone not logged into the site) cannot get ticket z.


Fatmama

August 1, 2017 at 8:02 am

Hi,

Right! Totally missed that feature! Thanks for the support!

Kind regards!

Viewing 10 reply threads

The support post ‘Restrict content pro – Restrict content metabox’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso