Custom Product Type for WooCommerce provides one verified collection shortcode:
[cwpt_products product_type="your_type"] Replace your_type with the custom product-type slug. The shortcode queries 12 products of that type and renders them through the WooCommerce product loop.
Shortcode syntax
| Part | Purpose |
|---|---|
cwpt_products | The shortcode name |
product_type | The product-type selector |
your_type | The actual type slug |
Course example
[cwpt_products product_type="course"] Use this on a dedicated Online Courses page after confirming that course is the actual type slug.
Service example
[cwpt_products product_type="service"] This creates a focused service collection using the active WooCommerce product loop.
How to add the shortcode
- Create or edit a WordPress page.
- Add a Shortcode block.
- Enter the shortcode with the correct product_type value.
- Preview the page.
- Verify products, images, prices, and links.
What the shortcode does
- Filters by the supplied custom product type.
- Queries 12 products.
- Uses the WooCommerce product loop for output.
How the product_type value works
The product_type value must be the type slug used by WooCommerce, not the visible page title and not necessarily the singular label shown to editors. A type labeled Online Course may use a slug such as course.
- Open WooCommerce > Product Types.
- Locate the type used by the products you want to display.
- Confirm its slug.
- Insert that exact value in the shortcode.
- Preview the page before adding it to navigation.
Typing the wrong slug is the most common reason for an empty collection.
Verified examples for different product models
Display online courses
[cwpt_products product_type="course"] Place this below a concise course-collection introduction. Link the page from the main navigation and from articles that help customers choose a course.
Display consultation services
[cwpt_products product_type="consultation"] This can support a dedicated Services page when Display In Shop is disabled for the type. The page becomes the intentional discovery route instead of mixing services with physical products.
Display rental products
[cwpt_products product_type="rental"] Use a clear introduction that explains rental periods, pickup, and the information customers should review on each product page.
What controls the product cards?
The shortcode uses the WooCommerce product loop. Product titles, images, prices, links, and card presentation therefore depend on the product records, WooCommerce templates, and the active theme.
Before changing the shortcode, verify:
- Each product has a clear title and featured image.
- The product is assigned to the intended custom type.
- Price and visibility are configured correctly.
- The WooCommerce loop looks correct elsewhere in the theme.
- The collection remains readable on mobile.
Build a useful collection page around the shortcode
The shortcode supplies the product grid; the page should supply context and navigation. A strong page structure is:
- A direct heading that names the product family.
- A short introduction explaining who the collection serves.
- One decision link when customers need help choosing.
- The shortcode output.
- Links to relevant taxonomy pages or supporting guides.
Keep the introduction concise so products appear early. Do not repeat every product specification above the grid.
Shortcode output and Display In Shop
Display In Shop controls whether products of the type join the main shop catalog. The shortcode creates a separate focused collection. These settings can support two different strategies:
| Catalog strategy | Display In Shop | Shortcode page |
|---|---|---|
| Products appear everywhere | Enabled | Optional focused collection |
| Dedicated discovery path | Disabled | Primary collection page |
When the type is hidden from the main shop, make sure the shortcode page is linked from navigation and relevant internal content.
Parameters you should not invent
The verified implementation does not define columns, order, orderby, pagination, limit, or per_page parameters. Adding unsupported attributes does not create those behaviors.
Troubleshooting empty output
- Confirm the product-type slug.
- Confirm products are assigned to that type.
- Confirm the products have the intended visibility and status.
- Test the shortcode on a clean page.
- Check the active theme’s WooCommerce loop output.
| Symptom | First check |
|---|---|
| No products appear | Slug and product-type assignment |
| Unexpected products appear | The product_type value |
| Cards look broken | Theme WooCommerce loop templates |
| Images are missing | Product featured images |
| The page is difficult on mobile | Theme grid and surrounding page content |
Final shortcode QA checklist
- The shortcode uses the exact verified syntax.
- The actual product-type slug replaces your_type.
- The expected products appear.
- Product cards link to the correct pages.
- Images, prices, and titles are complete.
- The page has an internal navigation path.
- Desktop and mobile output are readable.
Use the separate-page guide to build the complete collection and the product page for the product-type workflow.
For a dedicated discovery path, combine this shortcode with the shop-visibility guide. Use the taxonomy guide when the collection also needs hierarchical browsing.
Frequently asked questions
Is product_type required?
Supply the correct product-type slug so the shortcode can select the intended products.
Can I set the number of products?
The verified implementation queries 12 products and does not expose a documented limit parameter.
Does it use WooCommerce templates?
It renders the products through the WooCommerce product loop.


