{"id":70,"date":"2021-10-05T09:38:07","date_gmt":"2021-10-05T09:38:07","guid":{"rendered":"https:\/\/simplewpevents.com\/docs\/?post_type=ht_kb&#038;p=70"},"modified":"2023-12-29T12:33:47","modified_gmt":"2023-12-29T12:33:47","slug":"how-to-add-wp-event-widget-on-homepage-or-sidebar-using-shortcode","status":"publish","type":"ht_kb","link":"https:\/\/simplewpevents.com\/docs\/wpevents\/how-to-add-wp-event-widget-on-homepage-or-sidebar-using-shortcode\/","title":{"rendered":"How to add a Simple WP Events widget on the homepage or sidebar using shortcode?"},"content":{"rendered":"\n<p>No doubt, the homepage is an essential tool for your business and often serves as the first impression to potential customers. By adding the Simple WP Events widget on the homepage or sidebar, you can grab your user\u2019s attention more easily.&nbsp;<\/p>\n\n\n\n<p>Simple WP Events provides shortcodes to make this easy for you. All you need to do is to paste the shortcode into the respective section.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-cyan-blue-color has-text-color\">Shortcode<\/h2>\n\n\n\n<p class=\"has-text-align-center\"><code><div class=\"wpevents-shortcode-section wpevents-section\"><strong class=\"wpe-main-title\" >Upcoming Seminars<\/strong><div class=\"wpevent-main\"><\/div>        <div class=\"wpe-form-holder\">\r\n            <div class=\"wpe-subscribe-form-container\">\r\n                <form method=\"post\" action=\"https:\/\/simplewpevents.com\/docs\/wp-admin\/admin-post.php\" novalidate class=\"wpe-subscribe-form\" id=\"wpe-subscribe-form\" autocomplete=\"off\">\r\n                    <div class=\"wpe-col-full wpe-field\">\r\n                        <div class=\"wpe-above-error-field\">\r\n                            <span class=\"wpe-error-exclamation\">!<\/span> There was some problem with your submission. Please review the fields below\r\n                        <\/div>\r\n                    <\/div>\r\n                    <input type=\"hidden\" id=\"wpe_subscribe_form\" name=\"wpe_subscribe_form\" value=\"d71fcaee8c\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/docs\/wp-json\/wp\/v2\/ht-kb\/70\" \/>                        <h2 class=\"wpe-h2\">Subscribe With Us<\/h2>\r\n\t                                            <p class=\"wpe-form-description\">There are currently no seminars scheduled, but please fill out the form below and we'll be sure to notify you of upcoming seminars.<\/p>\r\n\t                                        <div class=\"wpe-name-box wpe-col-2\">\r\n                        <div class=\"wpe-form-control\">\r\n                                                        <input type=\"text\" name=\"wpe_first_name\" id=\"wpe_firstname\" placeholder=\"First Name*\" required>\r\n                            <small>This field is required<\/small>\r\n                        <\/div>\r\n                        <div class=\"wpe-form-control\">\r\n                                                        <input type=\"text\" name=\"wpe_last_name\" id=\"wpe_lastname\" placeholder=\"Last Name*\" required>\r\n                            <small>This field is required<\/small>\r\n                        <\/div>\r\n                    <\/div>\r\n                    <div class=\"wpe-col-2\">\r\n                                                <div class=\"wpe-form-control\">\r\n                                                        <input type=\"email\" name=\"wpe_email\" id=\"wpe_email\" placeholder=\"Email *\"required>\r\n                            <small>This field is required.<\/small>\r\n                            <span class=\"wpe-email-error-class\">Please enter a valid email address.<\/span>\r\n                        <\/div>\r\n                                            <\/div>\r\n                    <div class=\"wpe-col-2\">\r\n                                                                    <\/div>\r\n                                       <input type=\"hidden\" name=\"action\" value=\"subscribe_form\">\r\n                    <input type=\"hidden\" name=\"wpe_event_category\" value=\"\">\r\n                                            <span class=\"g-recaptcha\">Captcha not found.<\/span>\r\n                                            <button id=\"wpe-button\" class=\"button wpe-button\">Subscribe<\/button>\r\n                    <div class=\"wpe-button-loader\"><\/div>\r\n                <\/form>\r\n            <\/div>\r\n        <\/div>\r\n        <\/div><\/code><\/p>\n\n\n\n<p>Navigate to <strong>WordPress Dashboard &gt; Select pages or sidebar widget&nbsp;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/paper-attachments.dropbox.com\/s_DBB3520F20E20AC3E8059B8B900DA0B9DF1D1507EC4B1EF4CA061F2FEC820BF4_1627940574623_image.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>You can customize the shortcode using the following list of attributes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>number<\/strong>: Set no. of events you want to display in the widget. <strong>(default = 3)<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>title<\/strong>: Show\/Hide or Update the title of your widget (default: Event Menu Name in <a href=\"https:\/\/simplewpevents.com\/docs\/wpevents\/wp-events-settings-general\/\">Simple WP Events Settings \u2013 General<\/a>)<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>button_text<\/strong>: Update the button text of the widget. <strong>(default: See All (title))<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>location: <\/strong>Show\/Hide event location in widget. <strong>(default: true)<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>archive: <\/strong>Show\/Hide the link to the events archive page. <strong>(default: true)<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>date: <\/strong>Show\/Hide event date from the widget.<strong> (default: true)<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>class: <\/strong>Add a custom class to the widget section.<strong> (default: empty)<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>category: <\/strong>Display events from a specific category by using category ID.<strong> (default: empty &#8211; showing events from all categories.)<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>type: <\/strong>Show events from a specific type (seminar\/webinar\/client-event\/other-event). (<strong>default: empty &#8211; shows all events)<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>exc_type: <\/strong>Hide events for a specific type (seminar\/webinar\/client-event\/other-event). (<strong>default: empty &#8211; shows all events)<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>single-button: <\/strong>Show button for each event linking to the single event page. (<strong>default: false)<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>single-button-text: <\/strong>Change the text for the single event button. (<strong>default: Register)<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Example display on front-end when you are done:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/paper-attachments.dropbox.com\/s_715E4E8002C0D3C317667B47046FDCDF4A482E06D7A02872506C97BFE218B824_1627915801196_image.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>You can leave the attributes blank if you want to style this according to the theme.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>No doubt, the homepage is an essential tool for your business and often serves as the first impression to potential customers. By adding the Simple WP Events widget on the homepage or sidebar, you can grab your user\u2019s attention more easily.&nbsp; Simple WP Events provides shortcodes to make this easy [&hellip;]<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"ht-kb-category":[19],"ht-kb-tag":[],"class_list":["post-70","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-shortcodes"],"_links":{"self":[{"href":"https:\/\/simplewpevents.com\/docs\/wp-json\/wp\/v2\/ht-kb\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simplewpevents.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/simplewpevents.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/simplewpevents.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/simplewpevents.com\/docs\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":5,"href":"https:\/\/simplewpevents.com\/docs\/wp-json\/wp\/v2\/ht-kb\/70\/revisions"}],"predecessor-version":[{"id":814,"href":"https:\/\/simplewpevents.com\/docs\/wp-json\/wp\/v2\/ht-kb\/70\/revisions\/814"}],"wp:attachment":[{"href":"https:\/\/simplewpevents.com\/docs\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/simplewpevents.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=70"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/simplewpevents.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}