The following pages and shortcodes are required for WC Vendors Pro to run. These pages should have been created and set when you installed and activated WC Vendors Pro but if you need these shortcodes again for any reason they are as follows.
WC Vendors 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.
WC Vendors 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.
In WC Vendors Pro there is a vendor ratings system that allows for vendors to rate the products from vendors and 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:
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.
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 customised with the the pro-vendors-list.php template found in the following location.
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
[wcv_pro_vendorslist orderby="registered" order="ASC" per_page="12" has_products="yes" ]