diff --git a/docs/usage/wordpress.md b/docs/usage/wordpress.md index e9d65a0..8ecb454 100644 --- a/docs/usage/wordpress.md +++ b/docs/usage/wordpress.md @@ -409,7 +409,7 @@ Accessing an ACF field, sub field, or even option field is just as easy: ## @role -`@role` is a simple conditional that allows you to display specific content only to users who are logged in and have a specific role. With [`wp_get_current_user()->roles`](https://developer.wordpress.org/reference/functions/wp_get_current_user/) returning an array of roles in all lowercase, the passed role is automatically lowercased using `strtolower`. It can be closed using `@endrole`. +`@role` allows you to display specific content only to users who are logged in and have a specific role. With [`wp_get_current_user()->roles`](https://developer.wordpress.org/reference/functions/wp_get_current_user/) returning an array of roles in all lowercase, the passed role is automatically lowercased using `strtolower`. It can be closed using `@endrole`. ```php @role('author') @@ -417,6 +417,12 @@ Accessing an ACF field, sub field, or even option field is just as easy: @endrole ``` +```php +@role('author', 'contributor') + This content is only displayed to Authors and Contributors. +@endrole +``` + ## @user `@user` is a simple `is_user_logged_in()` conditional to display specific content only when a user is logged in. It can be closed using `@enduser`.