{"id":4485,"date":"2022-03-31T13:01:24","date_gmt":"2022-03-31T10:01:24","guid":{"rendered":"https:\/\/creativethemes.com\/blocksy\/?post_type=documentation&amp;p=4485"},"modified":"2022-03-31T13:01:24","modified_gmt":"2022-03-31T10:01:24","slug":"adding-the-off-canvas-menu-button-to-the-shortcuts-bar","status":"publish","type":"documentation","link":"https:\/\/creativethemes.com\/blocksy\/docs\/code-snippets\/adding-the-off-canvas-menu-button-to-the-shortcuts-bar\/","title":{"rendered":"Adding the Off Canvas Menu button to the Shortcuts Bar"},"content":{"rendered":"\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2022\/03\/Screen-Recording-2022-03-31-at-13.02.32.mov\"><\/video><figcaption>Custom shortcut button in action<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Many of you have asked us for a way to open the off canvas menu from the Shortcuts Bar extension. We&#8217;ve listened and delivered.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">General Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You will need to create a custom shortcut action, assign a custom icon and label to it and as the link, you&#8217;ll need to set it as <code><span class=\"stk-highlight\">#offcanvas<\/span><\/code>, and the custom class for this button will be <code><span class=\"stk-highlight\">ct-offcanvas-trigger<\/span><\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Desktop Specific Prerequisites<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re looking to enable the off canvas action for the desktop view, you will first need to add the trigger element and populate the off canvas area with some elements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Removing the Header Trigger desktop element<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Because this is a little workaround, there&#8217;s no official way to remove the header trigger element from the desktop variant. Though, there&#8217;s nothing a little bit of CSS cannot solve. Simply integrate this snippet into the Additional CSS pane of the Customiser and you should be good to go.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@media (min-width: 999px) {\n\t.ct-header-trigger {\n\t\tdisplay: none;\n\t}\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Many of you have asked us for a way to open the off canvas menu from the Shortcuts Bar extension. We&#8217;ve listened and delivered. General Prerequisites You will need to create a custom shortcut action, assign a custom icon and label to it and as the link, you&#8217;ll need to set it as #offcanvas, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"doc_categories":[125],"class_list":["post-4485","documentation","type-documentation","status-publish","hentry","doc_categories-code-snippets"],"acf":[],"_links":{"self":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/4485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/types\/documentation"}],"author":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/comments?post=4485"}],"version-history":[{"count":0,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/4485\/revisions"}],"wp:attachment":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/media?parent=4485"}],"wp:term":[{"taxonomy":"doc_categories","embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/doc_categories?post=4485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}