{"id":1967994,"date":"2025-12-25T07:24:17","date_gmt":"2025-12-25T12:24:17","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/?p=1967994"},"modified":"2026-04-22T01:16:34","modified_gmt":"2026-04-22T05:16:34","slug":"woocommerce-shortcodes","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/woocommerce-shortcodes\/","title":{"rendered":"Embedding Tickets and Products with WooCommerce Shortcodes"},"content":{"rendered":"\n<p>Customers who use WooCommerce to sell a variety of products often want their tickets to be treated as products as well, so they can sell everything together. We have a separate article <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/selling-tickets-from-the-woocommerce-products-page\/\">here<\/a> that explains how to sell tickets directly from a product page. In this article, we\u2019ll focus on how to embed products, including tickets, using WooCommerce shortcodes.<\/p>\n\n\n\n<p>By using the shortcode below, you can display a product along with its price and an Add to Cart button in a single place. <\/p>\n\n\n<p>[add_to_cart id=&#8221;00000&#8243; show_price=&#8221;true&#8221;]<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-finding-product-id\">Finding Product ID<\/h3>\n\n\n\n<p>To locate a product ID, go to WP Admin \u2192 Products \u2192 All Products, then hover over the product you want to use. The product ID will appear beneath the product name in the row details.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"195\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/PRODUCT-ID-1024x195.png\" alt=\"\" class=\"wp-image-1967998\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/PRODUCT-ID-1024x195.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/PRODUCT-ID-300x57.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/PRODUCT-ID-768x147.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/PRODUCT-ID.png 1279w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Once you have the product ID, you can insert the shortcode into your page. Keep in mind that this shortcode does not display the product name, so you\u2019ll need to add the name manually in a text block.<\/p>\n\n\n\n<p>Once you publish the page, the shortcode might appear unstyled. WooCommerce shortcodes offer limited built-in styling options. Most visual customization is done via CSS, not shortcode attributes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"509\" height=\"145\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/TAX-0.png\" alt=\"\" class=\"wp-image-1968003\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/TAX-0.png 509w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/TAX-0-300x85.png 300w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-styling-the-shortcode-with-css\">Styling the Shortcode with CSS<\/h3>\n\n\n\n<p>Now, with a bit of CSS, you can make the block look great and fit perfectly with your site\u2019s design.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"371\" height=\"207\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/WOO-shortcode.png\" alt=\"\" class=\"wp-image-1968007\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/WOO-shortcode.png 371w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/WOO-shortcode-300x167.png 300w\" sizes=\"auto, (max-width: 371px) 100vw, 371px\" \/><\/figure>\n\n\n\n<p>To achieve this look, place the code below in Dashboard \u2192 Appearance \u2192 Customize \u2192 Additional CSS.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n\/* Product Title Styling *\/\n.entry-content p:has(+ .add_to_cart_inline),\n.entry-content h3:has(+ .add_to_cart_inline),\n.entry-content strong:has(+ .add_to_cart_inline) {\n    display: block !important;\n    text-align: center !important;\n    font-family: &quot;Oswald&quot;, sans-serif !important;\n    font-size: 22px !important;\n    font-weight: 600 !important;\n    letter-spacing: 1px !important;\n    margin-bottom: -10px !important; \n    color: #111 !important;\n}\n\n\/* Product Card Container *\/\n.add_to_cart_inline {\n    display: flex !important;\n    flex-direction: column !important;\n    gap: 20px !important;\n    align-items: center !important;\n    background: #fff !important;\n    border: 1px solid #f0f0f0 !important;\n    border-radius: 16px !important;\n    padding: 40px 30px !important;\n    margin: 20px auto !important;\n    width: clamp(260px, 90%, 350px) !important;\n    box-shadow: 0 10px 25px rgba(0,0,0,0.04) !important;\n    transition: all 0.3s ease !important;\n}\n\n\/* Price and Button Styling *\/\n.add_to_cart_inline .woocommerce-Price-amount {\n    font-size: 24px !important;\n    color: #111 !important;\n}\n\n.add_to_cart_inline a.button {\n    background: #111 !important;\n    color: #fff !important;\n    padding: 12px 35px !important;\n    border-radius: 8px !important;\n    font-weight: 600 !important;\n    border: none !important;\n    transition: 0.2s !important;\n}\n<\/pre><\/div>\n\n\n<p>For some extra visual sparkle, check out the CSS snippets below.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-glass-effect-responsive-on-hover\">Glass effect responsive on hover<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"358\" height=\"208\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Glass-effect.png\" alt=\"\" class=\"wp-image-1968008\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Glass-effect.png 358w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Glass-effect-300x174.png 300w\" sizes=\"auto, (max-width: 358px) 100vw, 358px\" \/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n\/* Glassmorphism Effect *\/\n.add_to_cart_inline {\n    background: rgba(255, 255, 255, 0.45) !important;\n    backdrop-filter: blur(15px) saturate(180%) !important;\n    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;\n    \n    border: 1px solid rgba(255, 255, 255, 0.7) !important;\n    outline: 1px solid rgba(255, 255, 255, 0.2) !important;\n    \n    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05), \n                inset 0 0 0 1px rgba(255, 255, 255, 0.3) !important;\n}\n\n\/* Glass Interactive Hover *\/\n.add_to_cart_inline:hover {\n    background: rgba(255, 255, 255, 0.6) !important;\n    transform: translateY(-8px);\n    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1) !important;\n    border-color: rgba(255, 255, 255, 1) !important;\n}\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-horizontal-product\"><strong>Horizontal Product<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"442\" height=\"125\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Horizontal-product.png\" alt=\"\" class=\"wp-image-1968010\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Horizontal-product.png 442w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Horizontal-product-300x85.png 300w\" sizes=\"auto, (max-width: 442px) 100vw, 442px\" \/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n\/* Horizontal Override *\/\n.add_to_cart_inline {\n    flex-direction: row !important;\n    justify-content: space-between !important;\n    padding: 15px 25px !important;\n    width: 100% !important;\n    max-width: 500px !important;\n}\n\n\n\/* Compact Button *\/\n.add_to_cart_inline a.button {\n    padding: 10px 20px !important;\n    margin: 0 !important;\n}\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-capsule-product\">Capsule Product<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"346\" height=\"197\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/capsule.png\" alt=\"\" class=\"wp-image-1968016\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/capsule.png 346w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/capsule-300x171.png 300w\" sizes=\"auto, (max-width: 346px) 100vw, 346px\" \/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n\/* Title *\/\n.entry-content p:has(+ .add_to_cart_inline) {\n    font: 600 12px &quot;Oswald&quot;, sans-serif;\n    text-transform: uppercase;\n    color: #bbb;\n    margin: 30px auto 10px auto !important;\n    max-width: 500px;\n}\n\n\/* Fluid Pill - Shadow &amp; Border Removed *\/\n.add_to_cart_inline {\n    display: flex !important;\n    flex-direction: row !important;\n    justify-content: space-between !important;\n    align-items: center;\n    background: #f8f8f8 !important;\n    border-radius: 100px !important;\n    padding: 8px 10px 8px 25px !important;\n    margin-bottom: 12px !important;\n    max-width: 500px !important;\n    \/* Kill the shadow and borders here *\/\n    border: none !important;\n    box-shadow: none !important; \n    transition: 0.3s;\n}\n\n\/* Hover + Price Visibility *\/\n.add_to_cart_inline:hover { \n    background: #000 !important; \n    box-shadow: none !important; \/* Ensure shadow doesn&#039;t appear on hover *\/\n}\n\n.add_to_cart_inline .woocommerce-Price-amount { \n    font-size: 18px; \n    font-weight: 500; \n    color: #000 !important; \n}\n\n.add_to_cart_inline:hover .woocommerce-Price-amount, \n.add_to_cart_inline:hover .woocommerce-Price-amount span { \n    color: #fff !important; \n}\n\n\/* Inset Button - Shadow Removed *\/\n.add_to_cart_inline a.button {\n    background: #fff !important;\n    color: #000 !important;\n    border-radius: 100px !important;\n    padding: 10px 20px !important;\n    font-size: 11px;\n    box-shadow: none !important; \n    border: none !important;\n}\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-simple-design\">Simple Design<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"441\" height=\"135\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Simple.png\" alt=\"\" class=\"wp-image-1968018\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Simple.png 441w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Simple-300x92.png 300w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><\/figure>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n\/* 1. Delicate Title *\/\n.entry-content p:has(+ .add_to_cart_inline) {\n    font: 300 13px &quot;Oswald&quot;, sans-serif !important; \/* Thin weight *\/\n    letter-spacing: 3px !important;\n    text-transform: uppercase;\n    color: #999 !important; \/* Muted grey *\/\n    margin: 50px auto 0 auto !important;\n    max-width: 600px;\n    padding-bottom: 15px;\n    border-bottom: 1px solid #eee !important; \/* Hairline divider *\/\n}\n\n\/* 2. The Product Row *\/\n.add_to_cart_inline {\n    display: flex !important;\n    flex-direction: row !important;\n    justify-content: space-between !important;\n    align-items: center;\n    background: transparent !important;\n    border: none !important;\n    box-shadow: none !important;\n    padding: 25px 0 !important;\n    margin: 0 auto !important;\n    max-width: 600px !important;\n}\n\n\/* 3. The Price: Sophisticated &amp; Minimal *\/\n.add_to_cart_inline .woocommerce-Price-amount {\n    font-size: 16px !important;\n    font-weight: 300 !important;\n    color: #444 !important;\n    letter-spacing: 0.5px;\n}\n\n\/* 4. The Delicate &quot;Link&quot; Button *\/\n.add_to_cart_inline a.button {\n    background: transparent !important;\n    color: #999 !important;\n    border: none !important;\n    border-radius: 0 !important;\n    padding: 0 !important; \/* No box at all *\/\n    font-size: 11px !important;\n    font-weight: 400 !important;\n    text-transform: uppercase;\n    letter-spacing: 2px;\n    transition: all 0.4s ease;\n    text-decoration: none;\n}\n\n\/* Hover: Subtle reveal *\/\n.add_to_cart_inline a.button:hover {\n    color: #000 !important;\n    letter-spacing: 4px !important; \/* Text expands softly *\/\n}\n<\/pre><\/div>\n\n\n<p>Feel free to tweak the CSS using these classes to create the perfect snippets for your project.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-extra-functionality\">Extra Functionality<\/h3>\n\n\n\n<p>When listing multiple products or tickets on a single page, adding a cart can create a more fluid checkout experience. You can use any widget to achieve this; the example below demonstrates how to implement a <strong>Mini Cart<\/strong> widget.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"356\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Mini-Cart-1-1024x356.png\" alt=\"\" class=\"wp-image-1968024\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Mini-Cart-1-1024x356.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Mini-Cart-1-300x104.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Mini-Cart-1-768x267.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/Mini-Cart-1.png 1112w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"498\" height=\"410\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/image-5.png\" alt=\"\" class=\"wp-image-1968022\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/image-5.png 498w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/12\/image-5-300x247.png 300w\" sizes=\"auto, (max-width: 498px) 100vw, 498px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Customers who use WooCommerce to sell a variety of products often want their tickets to be treated as products as well, so they can sell everything together. We have a separate article here that explains how to sell tickets directly from a product page. In this article, we\u2019ll focus on how to embed products, including&#8230;<\/p>\n","protected":false},"author":46,"featured_media":1955565,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[1],"tags":[],"stellar-product-taxonomy":[],"class_list":["post-1967994","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"taxonomy_info":{"category":[{"value":1,"label":"Uncategorized"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Iris Irvin","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/iris\/"},"comment_info":0,"category_info":[{"term_id":1,"name":"Uncategorized","slug":"uncategorized","term_group":0,"term_taxonomy_id":1,"taxonomy":"category","description":"","parent":0,"count":3,"filter":"raw","term_order":"0","cat_ID":1,"category_count":3,"category_description":"","cat_name":"Uncategorized","category_nicename":"uncategorized","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1967994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1967994"}],"version-history":[{"count":21,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1967994\/revisions"}],"predecessor-version":[{"id":1968026,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1967994\/revisions\/1968026"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1967994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1967994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1967994"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1967994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}