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

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

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

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

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

Shows content only for non logged in users

Shows content for vendor user (vendor role)

Content for pending vendors

Content for those who logged in but not a vendor

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

Conditional shortcode for Post categories

Conditional shortcode for Blog categories

How to get Ids of categories

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

You can also check if current post or page has special id. Shortcode for this