Skip Navigation

[Resolved] Limiting time for users to see custom post types

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#1278839

Dear Toolset team,
I'm trying to create a membership site without Woocommerce plugin. I want to use your Access plugin and restrict people's access to some special articles. My question is about the restriction. Is it possible to restrict access to those articles for a limited time? Exactly like subscription plugins, I would like to grant access for a specific user for a limited amount of time, and after the time finishes, the access rights for that specific user become lifted AUTOMATICALLY.
Thank you in advance.

#1278891

Hi, I'm not aware of anything exactly like this in Toolset. Access can restrict content based on User Role, so in theory you could allow your Users to register as role A, then change them to role B after a specific amount of time. However, there is no event in User Forms that fires after a specific amount of time. You could use post expiration in a post Form to trigger an event after a specific amount of time, but not for User Forms. I think this would require custom programming. You would have to set some custom time field in the User profile, then when that time is passed check the User role and modify it if necessary.

A quick search led me to this article, which includes some helpful information about modifying user roles programmatically: https://usersinsights.com/wordpress-custom-role/

I can help you set a custom field value on the User profile upon registration with Forms if that would be helpful. Let me know if you need a code snippet to do that.

#1279077

Thank you.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.