Skip Navigation

[Resolved] How do I hide link to page with 'CRED Add New Content Form' based on permissions

This support ticket is created 7 years, 7 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Author
Posts
#437543

I have lots of CRED 'Add Content Forms' added to single WordPress pages - I am linking to these dedicated 'Add Content' pages and not rendering the form alongside other content.

How do I hide links to pages with 'CRED Add Content Forms' when the user doesn't have permission?

Essentially so things work the same as with 'CRED Edit Content Forms' where if the user doesn't have permission the link to edit the form doesn't show.

At the moment, if a user without permission to use a 'CRED Add Content Form' clicks an 'Add Content' page link, they are taken to a blank page (as expected, because they don't have permission for the form).

I basically want to hide the 'Add Content' link in the first place so my user is not reaching a dead page they don't have permission to use?

I have thought about trying to hide the links using [wpv-conditional] but not sure if this is the most effective way or if there is a better solution?

If I do need to hide with wpv-conditional how do I evaluate if they have permission for an individual form based on one of several user roles?

In all cases, I am using latest versions of Layouts\CRED\Access\Types\Views.

Thanks

#437697

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Tristian,

Thank you for contacting our support forum.

You can actually use the shortcode that we have from our access plugin.
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/

Please let me know if this helps.
Thanks,
Shane

#437763

What would have been ideal is to automatically hide 'CRED Add Content' forms based on Access permissions - the same way it works for 'CRED Edit Content' forms.

I will hide these links manually using the Access shortcode as suggested which presumably is the most efficient way to achieve what I want.

It does mean that I have to change permissions in 2 places every time I change permissions on a single form - once to set permissions with Access and secondly to update whether the link to the form is visible.

Thanks

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