i4w_user_has_access
Usage
This shortcode enables you to check if a user has access to a given page/post, defined by its ID.
It can be useful when used in conjunction with i4w_getpage to combine various content elements into a combined page.
[ELSE_user_has_access] conditional branching is supported.
Shortcode nesting is NOT supported.
Parameters
| Parameter | Description | Default | Required |
|---|---|---|---|
| post_id | The page or post ID for which to check the current user's access permissions. | None | Yes |
Example
Shortcode
[i4w_user_has_access post_id='1234']
If yes, display this content.
[ELSE_user_has_access]
Otherwise, display this.
[/i4w_user_has_access]