1. Home
  2. Knowledge Base
  3. WC Vendors Memberships
  4. Getting Started
  5. How to Display Membership Plans via Shortcode?
  1. Home
  2. Knowledge Base
  3. WC Vendors Memberships
  4. How to Display Membership Plans via Shortcode?

How to Display Membership Plans via Shortcode?

In order to list Vendor Membership plans on any page or post, the marketplace administrator can make use of the membership plan’s shortcode. The shortcode can be used as it is without any attributes to customize it, this will display all available memberships with all the data associated with it.

Basic usage

[wcv_membership_plans] – Display all membership plans with details for each membership.

Add the shortcode [wcv_membership_plans] to any page or post and save. If you preview the page/post, you should see the results of the shortcode displayed like this:

Advanced Usage

[wcvm_membership_plans show_membership_title="yes" show_membership_content='yes' show_product_limit='yes' show_commission='yes' show_files_count_limit='yes' show_disk_usage_limit='yes' exclude_membership='ID1,ID2,...']

You can choose to hide specific membership details by adding the shortcode attributes like in shortcode snippet above, add any of the attributes depending on what you want to hide, but replace yes with a no. Here is what each of them does.

show_membership_titleShow or hide the membership title.
show_membership_contentShow or hide the description of the membership
show_product_limitShow or hide the product limit
show_commissionShow or hide the commission for each limit
show_file_count_limitShow or hide the file count limit.
show_disk_usage_limitShow the disk usage limit

All these parameters have a default value of yes which means you only need to add them if you want to change the value to no which will hide the corresponding details as a result.

Excluding memberships from the list

If you wish specific memberships not to be displayed by the shortcode, you can add the exclude_memberships attribute with a comma-separated list of product IDs of the memberships you wish to exclude,

You can find the membership ID by going to the ‘Products > All Products’ menu on the Admin Dashboard. On the products list, hover over the title of the product and you will see its ID like in the screenshot below.

ScreenShot - Get WC Vendors Membership Product ID.

Do this for all the membership products you wish to exclude and add the IDs to the exclude_memberships attribute like this: exclude_memberships='179,...'

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support