1. Home
  2. Knowledge Base
  3. WC Vendors
  4. Marketplace Features
  5. All Available Shortcodes for WC Vendors
  1. Home
  2. Knowledge Base
  3. WC Vendors
  4. All Available Shortcodes for WC Vendors

All Available Shortcodes for WC Vendors

There are shortcodes available for both WC Vendors Marketplace and WC Vendors Pro. Some of these shortcodes are required for our plugins to work while others are available to use on your marketplace if you require them.

WC Vendors Marketplace Shortcodes

The following shortcodes are required for WC Vendors Marketplace to function. When you activate the plugin and run the setup wizard the required pages will also be created. If they are not then you will need to create the pages, assign the shortcodes, and then configure the pages in the WC Vendors settings.

Required Shortcodes

The following shortcodes are required to ensure that WC Vendors Marketplace functions. Do not place these shortcodes on any other page including WooCommerce pages.

Vendor Dashboard Page

This shows the vendor’s dashboard on the front end.

[wcv_vendor_dashboard]

Vendor Shop Settings Page

This page is usually a child page of the vendor dashboard page defined above.

[wcv_shop_settings]

Vendor Orders Page

This page is usually a child page of the vendor dashboard page defined above.

[wcv_orders]

General Shortcodes

Sold By

This is a shortcode that can be used in your theme or theme builder to move where the sold by is displayed on the single product page

[wcv_sold_by]

Other Shortcodes

The following list of shortcodes allows you to customize how your site looks and is based on the WooCommerce shortcodes of the same functionality with vendor filtering added. Where it says ‘VENDOR-LOGIN-NAME‘ replace this with the vendor’s username that you want to display.

Recent Products

To show recent products for a specific vendor, you can use the following shortcode. Available options include the following

  • vendor – the vendor you want to display the recent products of
  • per_page – the name of products per page
[wcv_recent_products vendor="VENDOR-LOGIN-NAME" per_page=3 ]

Vendor Products

To show all products for a specific vendor, for example in a blog post you can use the following shortcode. Available options include the following

  • vendor- the vendor you want to display the products of
[wcv_products vendor="VENDOR-LOGIN-NAME"]

If you have enabled featured products for your vendors, then the following shortcode will allow you to display the featured products for a specific vendor. Available options include the following

  • vendor- the vendor you want to display the featured products of
[wcv_featured_products vendor="VENDOR-LOGIN-NAME"]

Sale Products

If you would like to show the products on sale for a specific vendor, for example in a news or promotion, then use the following shortcode. Available options include the following

  • vendor- the vendor you want to display the sale products of
[wcv_sale_products vendor="VENDOR-LOGIN-NAME"]

Top Rated Products On Sale

If you would like to show the top-rated products for a vendor while using the built-in WooCommerce reviews system, then use the following shortcode. Available options include the following

  • vendor- the vendor you want to display the top-rated products of
[wcv_top_rated_products vendor="VENDOR-LOGIN-NAME"]

Best Selling Products On Sale

To show a list of best-selling products on sale for a specific vendor, you can use the following shortcode. Available options include the following

  • vendor- the vendor you want to display the best-selling sale products
[wcv_best_selling_products vendor="VENDOR-LOGIN-NAME"]

Product Category and Vendor

If you want to show a vendor’s products in a specific category, then you can use the following shortcode. Available options include the following

  • vendor- the vendor you want to display the products of
  • category – the category slug that you would like to display
[wcv_product_category category="category-slug" vendor="VENDOR-LOGIN-NAME"]

Directory of Vendors

If you would like to show a page with all your vendors on it then you can use the following shortcode. This can also be customized with the vendors-list.php template found at the following location.

  • /templates/front/vendor-list.php

This would be overridden by copying it to your themes folder in the appropriate position.

Available options include the following

  • order by – the order you would like to display the vendors in. The complete list of orderby options is available on the WordPress.org Codex. The default is ‘registered’.
  • order – the order you would like the vendors to be displayed, this can be ascending (ASC) or descending (DESC). Ascending (ASC) is the default.
  • per_page – how many vendors per page, this should be a number. The default is 12 vendors to be displayed.
  • has_products – yes will show vendors that have products published. If you set this to no, then you will include vendors without any products published. The default is yes
[wcv_vendorslist orderby="registered" order="ASC" per_page="12" has_products="yes"]

Please note

If vendors have not set their shop name, then they will not show up in the search results, even if you set “has_products” to no.

WC Vendors Pro Shortcodes

The following shortcodes are required for WC Vendors Pro to run. The pages for the shortcodes should have been created and set up when you installed and activated WC Vendors Pro and ran the setup wizard. If you need these shortcodes again for any reason, they are as follows.

Required Shortcodes

Pro Dashboard

The WC Vendors Pro dashboard is an entirely new page that introduces a complete front-end interface for your vendors. This page needs to be set in addition to the WC Vendors vendor dashboard page. This is the shortcode for this page.

[wcv_pro_dashboard]

Rating Page

In WC Vendors Pro, there is a vendor ratings system that allows customers to rate the products from vendors give them a star rating, and provide a comment. If you have this enabled, then you will also need to have the related page and shortcode configured. This page should be a child page of the WooCommerce > My Account page. The shortcode for this page is:

[wcv_feedback_form]

Pro Dashboard Navigation

Since version 1.3.3 of WC Vendors Pro, there has been a new shortcode available that allows you to place the navigation bar from the dashboard on other pages. This is useful if you have added custom pages to the navigation and need to ensure that the user interface is the same throughout. To enable the navigation on another page, use this shortcode.

[wcv_pro_dashboard_nav]

If you would like to display the vendor ratings stars with a link to the vendor store ratings page. This takes one argument, which is the vendor_id you would like to link to. The Vendor ID is also the user id.

[wcv_feedback vendor="VENDORID"]

Directory of Vendors (Pro)

If you would like to show a page with all your vendors on it then you can use the following shortcode. This can also be customized with the pro-vendors-list.php template found in the following location.

  • /templates/front/pro-vendors-list.php

This would be overridden by copying it to your themes folder in the appropriate position.

Available options include the following

  • orderby – the order you would like to display the vendors in. The complete list of orderby options is available on the WordPress.org Codex. The default is ‘registered’.
  • order – the order you would like the vendors to be displayed, this can be ascending (ASC) or descending (DESC). Ascending (ASC) is the default.
  • per_page – how many vendors per page, this should be a number. The default is 12 vendors to be displayed.
  • has_products – yes will show vendors that have products published. If you set this to no, then you will include vendors without any products published. The default is yes

Please note: Vendors must have all their shop information set for them to show in the directory. If they do not have their shop name or other information set it they will be left out of the list.

[wcv_pro_vendorslist orderby="registered" order="ASC" per_page="12" has_products="yes" ]

Vendor Details

This shortcode was introduced in WC Vendors Pro version 1.7.5

If you would like to retrieve a particular vendor’s details we have, you can use the following shortcode.

If you know the vendors’ user ID, you can use the vendor_id to determine the vendor.

[wcv_vendor vendor_id="VENDORUSERID" vendor_detail="DETAIL" ]

If you know the vendor’s username, you can use that to determine the vendor.

[wcv_vendor username="VENDORUSERNAME" vendor_detail="DETAIL"]

If the shortcode is used on a vendor store page (single or storefront) then the vendor is automatically detected.

The following vendor details are available to use

  • store_name – The vendor store name
  • paypal_address – The vendor’s Paypal email address
  • seller_info – The vendor seller info
  • store_description – The vendor store description
  • store_banner_id – The vendor store banner post id
  • store_banner_url – The vendor store banner URL
  • store_icon_id – The vendor store icon post id
  • store_icon_url – The vendor store icon URL
  • address1 – The vendor store address1
  • latitude – The vendors address latitude
  • longitude – The vendor address longitude
  • city – The vendor addresses city
  • state – The vendor address state
  • country – The vendor address country
  • postcode – The vendor address zip/postcode
  • company_url – The vendor address Company URL
  • sold_by – The vendor sold by link
  • view_store – The link for the vendor to view their store
  • ratings_stars – The vendor ratings stars (no link)
  • ratings_link – The vendor ratings stars with link
  • social_icons – The vendor’s social media icons with links
Was this article helpful?

Related Articles