{"id":107,"date":"2017-12-10T08:25:46","date_gmt":"2017-12-10T08:25:46","guid":{"rendered":"https:\/\/customers.ai\/wp-chatbot\/?p=107"},"modified":"2018-11-30T11:03:58","modified_gmt":"2018-11-30T05:33:58","slug":"shortcodes-and-attributes","status":"publish","type":"post","link":"https:\/\/customers.ai\/wp-chatbot\/shortcodes-and-attributes\/","title":{"rendered":"Shortcodes and Attributes"},"content":{"rendered":"\n<p>Shortcodes are useful to change the settings at page level<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2>Shortcode Attributes :<\/h2>\n\n\n\n<p>If an Attribute is not given, shortcode uses the values from Plugin Settings page.<\/p>\n\n\n\n<p><strong>page_id<\/strong> &#8211;\u00a0 to Change the Page ID.<\/p>\n\n\n\n<p><strong>color&nbsp;<\/strong> &#8211;&nbsp; to change the messenger theme color,&nbsp; add hex color code. ( since 2.1 )<\/p>\n\n\n\n<p><strong>logged_in_greetings&nbsp;<\/strong>&#8211; to change the greetings text for logged in user&nbsp;( since 2.1 )<\/p>\n\n\n\n<p><strong>logged_out_greetings&nbsp;<\/strong>&#8211;&nbsp;to change the greetings text for the logged out user&nbsp;(since 2.1 )<\/p>\n\n\n\n<p><strong>ref\u00a0<\/strong> &#8211; to change <a rel=\"noreferrer noopener\" href=\"https:\/\/customers.ai\/wp-chatbot\/messenger-ref\/\" target=\"_blank\">ref<\/a>\u00a0attribute<\/p>\n\n\n\n<p><strong>greeting_dialog_display<\/strong> &#8211; show, hide, fade<\/p>\n\n\n\n<ul><li>Show \u2013&nbsp; greeting dialog will always be shown when the plugin loads.<\/li><\/ul>\n\n\n\n<ul><li>Fade \u2013&nbsp; greeting dialog will be shown when the plugin loads, then fade away and stay hidden afterward.<\/li><\/ul>\n\n\n\n<p>Leave blank to apply default settings&nbsp;<br><a href=\"https:\/\/customers.ai\/wp-chatbot\/greeting-dialog-display\/\">Greetings Dialog Display<\/a><\/p>\n\n\n\n<p><strong>greeting_dialog_delay<\/strong> &#8211; Set the number of seconds of delay before the greeting\u00a0dialog is shown after the plugin is loaded.<br><a href=\"https:\/\/customers.ai\/wp-chatbot\/greeting-dialog-delay\/\">Greetings Dialog Delay<\/a><br><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>hide_desktop\u00a0<\/strong>&#8211; To hide the messenger on the desktop, set hide_desktop=true<\/p>\n\n\n\n<p><strong>hide_mobile <\/strong>&#8211; To hide the messenger on the mobile, set hide_mobile=true.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2>Examples:<\/h2>\n\n\n\n<p>Basic Shortcode\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[chatbot]<\/pre>\n\n\n\n<p>It gets the default values, as defined in plugin Settings page.<\/p>\n\n\n\n<p>To change page id\n<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[chatbot page_id=\"1744915998866434\"]<br><\/pre>\n\n\n\n<p>To Change Greetings Dialog<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[chatbot&nbsp;logged_in_greetings=\"Get 20% discount\" ref=\"20-discount\"]<\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>If Page ID is changed, Don&#8217;t forget to add domains to &#8216;Whitelisted Domains&#8217; for that Facebook Page.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1037\" height=\"474\" src=\"https:\/\/customers.ai\/wp-chatbot\/wp-content\/uploads\/2017\/12\/Add_domains.png\" alt=\"\" class=\"wp-image-54\" srcset=\"https:\/\/customers.ai\/wp-chatbot\/wp-content\/uploads\/2017\/12\/Add_domains.png 1037w, https:\/\/customers.ai\/wp-chatbot\/wp-content\/uploads\/2017\/12\/Add_domains-300x137.png 300w, https:\/\/customers.ai\/wp-chatbot\/wp-content\/uploads\/2017\/12\/Add_domains-768x351.png 768w, https:\/\/customers.ai\/wp-chatbot\/wp-content\/uploads\/2017\/12\/Add_domains-1024x468.png 1024w\" sizes=\"(max-width: 1037px) 100vw, 1037px\" \/><\/figure>\n\n\n\n<p><a href=\"https:\/\/customers.ai\/wp-chatbot\/wp-chatbot-settings\/\" target=\"_blank\" rel=\"noreferrer noopener\">Plugin Settings<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\n\nTo avoid duplicates, Adding Shortcode in a post removes the default Settings Messenger and add new Messenger based on the Shortcode Attributes.\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shortcodes are useful to change the settings at page level Shortcode Attributes : If an Attribute is not given, shortcode uses the values from Plugin Settings page. page_id &#8211;\u00a0 to Change the Page ID. color&nbsp; &#8211;&nbsp; to change the messenger theme color,&nbsp; add hex color code. ( since 2.1 ) logged_in_greetings&nbsp;&#8211; to change the greetings &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/customers.ai\/wp-chatbot\/shortcodes-and-attributes\/\"> <span class=\"screen-reader-text\">Shortcodes and Attributes<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[6,8],"tags":[9],"acf":[],"_links":{"self":[{"href":"https:\/\/customers.ai\/wp-chatbot\/wp-json\/wp\/v2\/posts\/107"}],"collection":[{"href":"https:\/\/customers.ai\/wp-chatbot\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/customers.ai\/wp-chatbot\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/customers.ai\/wp-chatbot\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/customers.ai\/wp-chatbot\/wp-json\/wp\/v2\/comments?post=107"}],"version-history":[{"count":27,"href":"https:\/\/customers.ai\/wp-chatbot\/wp-json\/wp\/v2\/posts\/107\/revisions"}],"predecessor-version":[{"id":1232,"href":"https:\/\/customers.ai\/wp-chatbot\/wp-json\/wp\/v2\/posts\/107\/revisions\/1232"}],"wp:attachment":[{"href":"https:\/\/customers.ai\/wp-chatbot\/wp-json\/wp\/v2\/media?parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/customers.ai\/wp-chatbot\/wp-json\/wp\/v2\/categories?post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/customers.ai\/wp-chatbot\/wp-json\/wp\/v2\/tags?post=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}