Conditional shortcodes of Rehub theme
User shortcodes
Such shortcodes will work on all pages and will use current logged user information.
Conditional shortcode for member Types
[rh_is_bpmember_type type='prouser']
Content which is visible for members with member type "prouser
[/rh_is_bpmember_type]
This shortcode will check member type of user. If it’s the same as you set in “type” parameter, user will see content which you place inside shortcode
Conditional shortcode for Member Roles
[rh_is_bpmember_role role='vendor']
Content which is visible for members with role "vendor
[/rh_is_bpmember_role]
This shortcode will check member role of user. If it’s the same as you set in “role” parameter, user will see content which you place inside shortcode. You can set several roles at once with commas.
Conditional Shortcode for WCFM Membership
[rh_is_wcfm_role role='111']
Content is visible for members with membership ID 111
[/rh_is_wcfm_role]
This shortcode is used only for Membership addon of plugin WCFM. Place ID of your membership in role parameter
If you want to show something for users without special role, use next shortcode
[rh_is_not_wcfm_role role='111']
Content is visible for members who have no membership ID 111
[/rh_is_not_wcfm_role]
You can find your membership ID when you create membership plan in admin dashboard of WCFM (you will see it on shortcodes of membership button)
Check if user is Logged or not
[wpsm_is_user]
Content only for logged in users
[/wpsm_is_user]
Shows content only for non logged in users
[wpsm_is_guest]
Content
[/wpsm_is_guest]
Shows content for vendor user (vendor role)
[wpsm_is_vendor]
Content which will be visible only for vendors.
[/wpsm_is_vendor]
Content for pending vendors
[wpsm_is_pending_vendor]
Content
[/wpsm_is_pending_vendor]
Content for those who logged in but not a vendor
[wpsm_not_vendor_logged]
Content
[/wpsm_not_vendor_logged]
Conditional shortcode for categories
Such shortcode can be used for inner pages of posts, products, blogs. It finds category of post and if post belongs to category, you can show some conditional data
Conditional shortcode for Product categories
[rh_is_category tax="product_cat" ids=1,2,3]
Content for product category with ids 1,2 or 3
[/rh_is_category]
Conditional shortcode for Post categories
[rh_is_category tax="category" ids=1,2,3]
Content for post category with ids 1,2 or 3
[/rh_is_category]
Conditional shortcode for Blog categories
[rh_is_category tax="blog_category" ids=1,2,3]
Content for blog category with ids 1,2 or 3
[/rh_is_category]
Conditional shortcode to check Single Post type
Sometimes you may need to check if current page is inner page and belongs to special Post type. For example, if you want to check if current page in Blog post. Here is example
[rh_is_singular type="blog"]
Content for inner Blog page
[/rh_is_singular]
You can also check if current post or page has special id. Shortcode for this
[rh_is_singular id=22]
Content for inner Blog page
[/rh_is_singular]