Buy B2BKing
$179 $129
The following shortcode can be used to restrict content, so that it can be seen only by groups/b2b/b2c/users
[b2bking_content show_to=b2b]Your content here...[/b2bking_content]
The parameter show_to is mandatory. This parameter can contain multiple items, comma-separated. The parameter supports 5 elements:
More examples:
[b2bking_content show_to=b2c,loggedout,admin]Your content here...[/b2bking_content]
In this example: b2c users, logged out users, and the user "admin" will see content
[b2bking_content show_to=123,b2c,loggedout,admin]Your content here...[/b2bking_content]
In this example: b2b users in the group with ID 123, b2c users, logged out users and the user admin will see the content.
[b2bking_content show_to=123,14,88]Your content here...[/b2bking_content]
In this example: b2b users in groups 123,14 and 88 will see the content.
The shortcode above will not be applicable to all situations. An often encountered scenario would be a need to apply CSS for only particular users.
B2BKing adds classes to the body tag:
The classes you can use are:
That way for example you can hide some menu items for logged out users by simply using:
.b2bking_logged_out #menu_item{ display:none; }
Powered by BetterDocs