{"id":1947233,"date":"2020-05-20T07:55:53","date_gmt":"2020-05-20T11:55:53","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?post_type=tribe-knowledgebase&#038;p=1947233"},"modified":"2024-10-25T09:30:40","modified_gmt":"2024-10-25T13:30:40","slug":"embedding-tickets-and-rsvps","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/embedding-tickets-and-rsvps\/","title":{"rendered":"Embedding Tickets and RSVPs"},"content":{"rendered":"\n<p>Let&#8217;s say you&#8217;ve just created tickets for your event using the Event Tickets plugin \u2014 with the Event Tickets Plus add-on installed \u2014 and those tickets are displaying nicely on your event page. Now, what if you want to embed your tickets, say, on your homepage? Maybe you&#8217;ve created a landing page promoting the event and would like to drop the tickets in there.<\/p>\n\n\n\n<p>That&#8217;s exactly what the <code>[tribe_tickets]<\/code> and <code>[tribe_tickets_rsvp]<\/code> shortcodes are designed to do. Add those to any WordPress page or post (including custom post types) to display tickets and RSVPs \u2014 or both! \u2014 for a given event.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2020\/03\/ext-ticket-shortcode-default.png\" alt=\"Screenshot showing a webpage with an embedded ticket form.\" class=\"wp-image-2032916\"\/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-requirements\">Requirements<\/h2>\n\n\n\n<p>Both <a href=\"https:\/\/wordpress.org\/plugins\/event-tickets\/\" target=\"_blank\" rel=\"noreferrer noopener\">Event Tickets<\/a> and the <a href=\"https:\/\/theeventscalendar.com\/products\/wordpress-event-tickets\/\" target=\"_blank\" rel=\"noreferrer noopener\">Event Tickets Plus<\/a> add-on are required to use the shortcodes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-tribe-tickets-shortcode\">Tribe Tickets shortcode<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; gutter: false; title: ; notranslate\" title=\"\">\n&#x5B;tribe_tickets post_id=&quot;123&quot;]\n<\/pre><\/div>\n\n\n<p>The <code>[tribe_tickets]<\/code> shortcode displays the tickets block when used on a WordPress page or post. It typically requires the <code>post_id<\/code> parameter, which is the ID of the event (post or page, depending on your site configuration) where the tickets were created.<\/p>\n\n\n\n<p><em>Note: In certain cases, such as when creating dynamic templates or using a page builder, the <code>post_id <\/code>parameter may not be necessary. See the <a href=\"#h-using-the-tribe-tickets-and-tribe-tickets-rsvp-shortcodes-without-post-id-parameter\">section below<\/a> for more details.<\/em><\/p>\n\n\n\n<p>Finding the Post ID can be tricky in WordPress. One way is by editing the page or post and locating it in the browser&#8217;s address bar.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/knowledgebase\/wp-content\/uploads\/2020\/05\/wordpress-admin-editor-page-post-id-1024x719.png\" alt=\"Screenshot showing the WordPress block editor with the page ID highlighted in the browser's address bar.\" class=\"wp-image-1947285\"\/><figcaption class=\"wp-element-caption\">The post ID is an auto-generated number that WordPress assigns to pages and posts. It&#8217;s revealed in the browser address bar in the editor.<\/figcaption><\/figure>\n\n\n\n<p>Another way to locate the a page or post ID is to navigate to the <a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/k\/tickets-managing-your-orders-and-attendees\/#Attendee_list\">attendee report<\/a> for that event.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"\/knowledgebase\/wp-content\/uploads\/2020\/05\/IDs-for-Event-Tickets-Plus-Shortcodes-1024x755.png\" alt=\"Diagram showing a screenshot of the attendee reports page for an event where the Event Post ID is highlighted on the screen.\" class=\"wp-image-1947251\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-tribe-tickets-rsvp-shortcode\">Tribe Tickets RSVP shortcode<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; gutter: false; title: ; notranslate\" title=\"\">\n&#x5B;tribe_tickets_rsvp post_id=&quot;123&quot;]\n<\/pre><\/div>\n\n\n<p>This shortcode displays the RSVP form and typically requires the <code>post_id<\/code> parameter, which represents the ID of the event, page, or post where the RSVP was created.<\/p>\n\n\n\n<p><em>Note: In certain cases, such as when creating dynamic templates or using a page builder, the <code>post_id<\/code> parameter may not be necessary. See the <a href=\"#h-using-the-tribe-tickets-and-tribe-tickets-rsvp-shortcodes-without-post-id-parameter\">section below<\/a> for more details.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-displaying-tickets-via-shortcode\">Displaying Tickets via Shortcode<\/h2>\n\n\n\n<p>You can also use a shortcode to display singular or multiple tickets on a page or post. To do this, you can use the <code>ticket_id<\/code> parameter, so it&#8217;ll look something like this: <code>[tribe_tickets post_id=\"12\"<\/code> <code>ticket_id=\"29\"]<\/code> or <code>[tribe_tickets_rsvp post_id=\"13\"<\/code> <code>ticket_id=\"30\"]<\/code>. You can find the ticket ID in the attendee report.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-using-the-tribe-tickets-and-tribe-tickets-rsvp-shortcodes-without-post-id-parameter\">Using the <code>[tribe_tickets]<\/code> and <code>[tribe_tickets_rsvp]<\/code> Shortcodes Without <code>post_id<\/code> Parameter<\/h3>\n\n\n\n<p>In some cases, for example when building dynamic templates using a page builder (e.g., Avada, Elementor) or when manually rendering content with <code>do_shortcode()<\/code>, these shortcodes do not necessarily require the <code>post_id<\/code> parameter. If no <code>post_id<\/code> is provided, the shortcode will automatically detect and use the ID of the current post.<\/p>\n\n\n\n<p>This can be useful when creating templates that pull in dynamic content, as it allows for more flexibility without the need to manually specify the event ID each time.<\/p>\n\n\n\n<p><em>Keep in mind that this only works when the shortcode is rendered in the context of a specific post or event.<\/em><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s say you&#8217;ve just created tickets for your event using the Event Tickets plugin \u2014 with the Event Tickets Plus add-on installed \u2014 and those tickets are displaying nicely on your event page. Now, what if you want to embed your tickets, say, on your homepage? Maybe you&#8217;ve created a landing page promoting the event&#8230;<\/p>\n","protected":false},"author":34,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","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":[77,88],"tags":[76],"stellar-product-taxonomy":[156],"class_list":["post-1947233","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-shortcodes","category-tickets","tag-shortcodes","stellar-product-taxonomy-event-tickets-plus"],"acf":[],"taxonomy_info":{"category":[{"value":77,"label":"Shortcodes"},{"value":88,"label":"Ticketing"}],"post_tag":[{"value":76,"label":"Shortcodes"}],"stellar-product-taxonomy":[{"value":156,"label":"Event Tickets Plus"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"jaimem","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/jaimem\/"},"comment_info":0,"category_info":[{"term_id":77,"name":"Shortcodes","slug":"shortcodes","term_group":0,"term_taxonomy_id":77,"taxonomy":"category","description":"","parent":61,"count":16,"filter":"raw","term_order":"0","cat_ID":77,"category_count":16,"category_description":"","cat_name":"Shortcodes","category_nicename":"shortcodes","category_parent":61},{"term_id":88,"name":"Ticketing","slug":"tickets","term_group":0,"term_taxonomy_id":88,"taxonomy":"category","description":"","parent":61,"count":83,"filter":"raw","term_order":"0","cat_ID":88,"category_count":83,"category_description":"","cat_name":"Ticketing","category_nicename":"tickets","category_parent":61}],"tag_info":[{"term_id":76,"name":"Shortcodes","slug":"shortcodes","term_group":0,"term_taxonomy_id":76,"taxonomy":"post_tag","description":"","parent":0,"count":17,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1947233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1947233"}],"version-history":[{"count":1,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1947233\/revisions"}],"predecessor-version":[{"id":1956007,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1947233\/revisions\/1956007"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1947233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1947233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1947233"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1947233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}