Support

Home Forums Event Espresso Premium Access shortcode for page content

Access shortcode for page content

Posted: September 29, 2020 at 4:49 pm

Viewing 1 reply thread


bhesketh

September 29, 2020 at 4:49 pm

Hello

We need to create a custom shortcode that determines whether a logged in user is registered for a specific event and as a result has access to content on a page.

Can you give us some ideas how to do this?

Thank you!


Tony

  • Support Staff

October 5, 2020 at 10:26 am

Hi there,

Have the users registered onto the event with the WP User Integration Add-on active?

How comfortable with PHP are you?

This snippet shows you have your can pull a registration for a specific event for the contact linked to the current EE user:

https://gist.github.com/Pebblo/10669adfeea322ade3d96a38857fb46b#file-example-php-L10-L27

For the above to function the user needed to register onto the event with the above add-on active and either used the same details that matched there WP user info, or have the sync feature on so whatever details they did use updated their WP user info.

Viewing 1 reply thread

The support post ‘Access shortcode for page content’ 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