If content is restricted, Show nothing
-
I am creating a custom navigation for members only. I am able to display the navigation buttons using the wa_restricted shortcode. However when users are not logged in, the login button is displayed, and if the user doesn’t have the necessary access rights, they see the following message:
“You are not authorized to access the requested content.”I realize this is useful but we don’t want to display the login button or the message in every single instance of a restricted content block.
Is there a parameter I can pass to avoid rendering any elements if the user doesn’t have access to the content? or at least is it possible to wrap the message in a tag with a class so it can be hidden via CSS?
- The topic ‘If content is restricted, Show nothing’ is closed to new replies.