{"id":1250,"date":"2019-12-20T14:20:57","date_gmt":"2019-12-20T14:20:57","guid":{"rendered":"https:\/\/grooni.com\/docs\/groovy-menu\/?page_id=1250"},"modified":"2021-03-24T16:11:09","modified_gmt":"2021-03-24T16:11:09","slug":"mega-menu-actions","status":"publish","type":"page","link":"https:\/\/grooni.com\/docs\/groovy-menu\/mega-menu-actions\/","title":{"rendered":"Mega Menu Actions"},"content":{"rendered":"\n<h2>Overview<\/h2>\n\n\n\n<p>The actions in the Groovy <a href=\"https:\/\/groovymenu.grooni.com\">WordPress Mega Menu<\/a> are created to execute custom code at the time the menu <a href=\"https:\/\/grooni.com\/docs\/groovy-menu\/dashboard-settings\/creating-new-preset\/\">Groovy menu preset<\/a> is built. With their help, you can display additional HTML markup in the provided action areas.<\/p>\n\n\n\n<p>All areas where actions are performed the code are marked in yellow in the screenshot of below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2019\/11\/2019-11-14__1267x234__005.png\"><img loading=\"lazy\" width=\"1024\" height=\"189\" src=\"https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2019\/11\/2019-11-14__1267x234__005-1024x189.png\" alt=\"All of the Header Groovy Menu action areas screenshot\" class=\"wp-image-1253\" srcset=\"https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2019\/11\/2019-11-14__1267x234__005-1024x189.png 1024w, https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2019\/11\/2019-11-14__1267x234__005-300x55.png 300w, https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2019\/11\/2019-11-14__1267x234__005-768x142.png 768w, https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2019\/11\/2019-11-14__1267x234__005.png 1267w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>All of the Header Groovy Menu action areas screenshot<\/figcaption><\/figure><\/div>\n\n\n\n<ul><li><a href=\"#gm_before_main_header\">gm_before_main_header<\/a><\/li><li><a href=\"#gm_after_main_header\">gm_after_main_header<\/a><\/li><li><a href=\"#gm_toolbar_left_first\">gm_toolbar_left_first<\/a><\/li><li><a href=\"#gm_toolbar_left_last\">gm_toolbar_left_last<\/a><\/li><li><a href=\"#gm_toolbar_right_first\">gm_toolbar_right_first<\/a><\/li><li><a href=\"#gm_toolbar_right_last\">gm_toolbar_right_last<\/a><\/li><li><a href=\"#gm_before_logo\">gm_before_logo<\/a><\/li><li><a href=\"#gm_after_logo\">gm_after_logo<\/a><\/li><li><a href=\"#gm_main_menu_nav_first\">gm_main_menu_nav_first<\/a><\/li><li><a href=\"#gm_main_menu_nav_last\">gm_main_menu_nav_last<\/a><\/li><li><a href=\"#gm_after_main_menu_nav\">gm_after_main_menu_nav<\/a><\/li><li><a href=\"#gm_mobile_main_menu_nav_first\">gm_mobile_main_menu_nav_first<\/a><\/li><li><a href=\"#gm_mobile_main_menu_nav_last\">gm_mobile_main_menu_nav_last<\/a><\/li><li><a href=\"#gm_mobile_after_main_menu_nav\">gm_mobile_after_main_menu_nav<\/a><\/li><li><a href=\"#gm_main_menu_actions_button_first\">gm_main_menu_actions_button_first<\/a><\/li><li><a href=\"#gm_main_menu_actions_button_last\">gm_main_menu_actions_button_last<\/a><\/li><li>gm_mobile_before_search_icon<\/li><li>gm_mobile_before_minicart<\/li><li>gm_custom_mobile_hamburger<\/li><li>gm_before_mobile_hamburger<\/li><li>gm_after_mobile_hamburger<\/li><\/ul>\n\n\n\n<h2 id=\"gm_before_main_header\">Action: gm_before_main_header<\/h2>\n\n\n\n<p>Fires before displaying the Groovy Menu markup. It may be useful to display <strong>another top bar<\/strong>, your banner or custom script above of the menu.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires before the groovy menu output.\n *\n * @since 1.2.20\n *\/\ndo_action( 'gm_before_main_header' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the <strong>functions.php<\/strong> of your <a href=\"https:\/\/grooni.com\/docs\/crane\/general\/what-wordpress-child-theme-is\/\">WordPress child theme<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_before_main_header', 'custom_child_func__gm_before_main_header', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_before_main_header' ) ) {\n\tfunction custom_child_func__gm_before_main_header() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_after_main_header\">Action: gm_after_main_header<\/h2>\n\n\n\n<p>Fires after HTML markup of the Groovy Menu. It may be useful to display a banner, blocks after a menu or execute some shortcode.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires after the groovy menu output.\n *\n * @since 1.2.20\n *\/\ndo_action( 'gm_after_main_header' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_after_main_header', 'custom_child_func__gm_after_main_header', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_after_main_header' ) ) {\n\tfunction custom_child_func__gm_after_main_header() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_toolbar_left_first\">Action: gm_toolbar_left_first<\/h2>\n\n\n\n<p>Fires in <a href=\"https:\/\/groovymenu.grooni.com\/wp-mega-menu-toolbar\/\">top bar WordPress<\/a> before of the left part, where contact details are usually located.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires at the toolbar left as first element output.\n *\n * @since 1.8.18\n *\/\ndo_action( 'gm_toolbar_left_first' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_toolbar_left_first', 'custom_child_func__gm_toolbar_left_first', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_toolbar_left_first' ) ) {\n\tfunction custom_child_func__gm_toolbar_left_first() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_toolbar_left_last\">Action: gm_toolbar_left_last<\/h2>\n\n\n\n<p>Fires in the top bar (toolbar menu) after the left part, where contact details are usually located.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires at the toolbar left as last element output.\n *\n * @since 1.8.18\n *\/\ndo_action( 'gm_toolbar_left_last' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_toolbar_left_last', 'custom_child_func__gm_toolbar_left_last', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_toolbar_left_last' ) ) {\n\tfunction custom_child_func__gm_toolbar_left_last() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_toolbar_right_first\">Action: gm_toolbar_right_first<\/h2>\n\n\n\n<p>Fires in the toolbar menu in front of the right side, where social network links are usually located.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires at the toolbar right as first element output.\n *\n * @since 1.8.18\n *\/\ndo_action( 'gm_toolbar_right_first' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_toolbar_right_first', 'custom_child_func__gm_toolbar_right_first', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_toolbar_right_first' ) ) {\n\tfunction custom_child_func__gm_toolbar_right_first() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_toolbar_right_last\">Action: gm_toolbar_right_last<\/h2>\n\n\n\n<p>Fires in the toolbar after the right side, where the links of social networks are usually located.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires at the toolbar right as last element output.\n *\n * @since 1.8.18\n *\/\ndo_action( 'gm_toolbar_right_last' );\n<\/code><\/pre>\n\n\n\n<p> An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_toolbar_right_last', 'custom_child_func__gm_toolbar_right_last', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_toolbar_right_last' ) ) {\n\tfunction custom_child_func__gm_toolbar_right_last() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_before_logo\">Action: gm_before_logo<\/h2>\n\n\n\n<p>Fires before the logotype<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires before the groovy menu Logo output.\n *\n * @since 1.2.20\n *\/\ndo_action( 'gm_before_logo' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_before_logo', 'custom_child_func__gm_before_logo', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_before_logo' ) ) {\n\tfunction custom_child_func__gm_before_logo() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_after_logo\">Action: gm_after_logo<\/h2>\n\n\n\n<p>Fires after the logotype. Read also <a href=\"https:\/\/grooni.com\/docs\/groovy-menu\/preset-settings\/general-settings\/logo\/\">how to add custom logo in WordPress<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires after the groovy menu Logo output.\n *\n * @since 1.2.20\n *\/\ndo_action( 'gm_after_logo' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_after_logo', 'custom_child_func__gm_after_logo', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_after_logo' ) ) {\n\tfunction custom_child_func__gm_after_logo() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_main_menu_nav_first\">Action: gm_main_menu_nav_first<\/h2>\n\n\n\n<p>Fires before at the main menu nav.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires beofre at the main menu nav.\n *\n * @since 1.9.5\n *\/\ndo_action( 'gm_main_menu_nav_first' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_main_menu_nav_first', 'custom_child_func__gm_main_menu_nav_first', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_main_menu_nav_first' ) ) {\n\tfunction custom_child_func__gm_main_menu_nav_first() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_main_menu_nav_last\">Action: gm_main_menu_nav_last<\/h2>\n\n\n\n<p>Fires after at the <a href=\"https:\/\/groovymenu.grooni.com\/standard-wordpress-menu-plugin\/\">WordPress main navigation<\/a> <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires after at the main menu nav.\n *\n * @since 1.9.5\n *\/\ndo_action( 'gm_main_menu_nav_last' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_main_menu_nav_last', 'custom_child_func__gm_main_menu_nav_last', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_main_menu_nav_last' ) ) {\n\tfunction custom_child_func__gm_main_menu_nav_last() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_after_main_menu_nav\">Action: gm_after_main_menu_nav<\/h2>\n\n\n\n<p>Fire after closing the HTML NAV tag of the main navigation menu.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires after closing the HTML NAV tag of the main navigation menu.\n *\n * @since 1.9.5\n *\/\ndo_action( 'gm_after_main_menu_nav' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_after_main_menu_nav', 'custom_child_func__gm_after_main_menu_nav', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_after_main_menu_nav' ) ) {\n\tfunction custom_child_func__gm_after_main_menu_nav() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_mobile_main_menu_nav_first\">Action: gm_mobile_main_menu_nav_first<\/h2>\n\n\n\n<p>Fires before displaying the markup of the navigation menu for the mobile device.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires before mobile main menu nav.\n *\n * @since 1.9.5\n *\/\ndo_action( 'gm_mobile_main_menu_nav_first' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_mobile_main_menu_nav_first', 'custom_child_func__gm_mobile_main_menu_nav_first', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_mobile_main_menu_nav_first' ) ) {\n\tfunction custom_child_func__gm_mobile_main_menu_nav_first() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_mobile_main_menu_nav_last\">Action: gm_mobile_main_menu_nav_last<\/h2>\n\n\n\n<p> Fires after displaying the markup of the navigation menu for the mobile device. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires after the mobile main menu nav.\n *\n * @since 1.9.5\n *\/\ndo_action( 'gm_mobile_main_menu_nav_last' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_mobile_main_menu_nav_last', 'custom_child_func__gm_mobile_main_menu_nav_last', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_mobile_main_menu_nav_last' ) ) {\n\tfunction custom_child_func__gm_mobile_main_menu_nav_last() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_mobile_after_main_menu_nav\">Action: gm_mobile_after_main_menu_nav<\/h2>\n\n\n\n<p>Fires after markup of the navigation menu and the search unit for the mobile device.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires after markup of the navigation menu and the search unit for the mobile device.\n *\n * @since 1.9.5\n *\/\ndo_action( 'gm_mobile_after_main_menu_nav' );\n<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the<strong> functions.php <\/strong>of your WordPress child theme.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_mobile_after_main_menu_nav', 'custom_child_func__gm_mobile_after_main_menu_nav', 10 );\n\nif ( ! function_exists( 'custom_child_func__gm_mobile_after_main_menu_nav' ) ) {\n\tfunction custom_child_func__gm_mobile_after_main_menu_nav() {\n\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\n\t\techo $output;\n\n\t}\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"gm_main_menu_actions_button_first\">Action: gm_main_menu_actions_button_first<\/h2>\n\n\n\n<p>Fires as first groovy menu action button (before Search Icon \/ Woo Cart)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2020\/07\/2020-07-06__1015x205__003.png\" alt=\"\" class=\"wp-image-1753\" width=\"1013\" height=\"205\" srcset=\"https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2020\/07\/2020-07-06__1015x205__003.png 1013w, https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2020\/07\/2020-07-06__1015x205__003-300x61.png 300w, https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2020\/07\/2020-07-06__1015x205__003-768x155.png 768w\" sizes=\"(max-width: 1013px) 100vw, 1013px\" \/><\/figure>\n\n\n<p>In order to these Actions are works, should be enabled a toggle <em>&#8220;Search form type&#8221;<\/em> or <em>&#8220;Show WooCommerce minicart&#8221;<\/em> in the <code>Preset &gt; General &gt; General settings<\/code><\/p>\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires as first menu action buttons. (before Search Icon \/ Woo Cart)\n *\n * @since 2.2.0\n *\/\ndo_action( 'gm_main_menu_actions_button_first' );<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the functions.php of your WordPress child theme.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_main_menu_actions_button_first', 'custom_child_func__gm_main_menu_actions_button_first', 10 );\nif ( ! function_exists( 'custom_child_func__gm_main_menu_actions_button_first' ) ) {\n\tfunction custom_child_func__gm_main_menu_actions_button_first() {\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\t\techo $output;\n\t}\n}<\/code><\/pre>\n\n\n\n<h2 id=\"gm_main_menu_actions_button_last\">Action: gm_main_menu_actions_button_last<\/h2>\n\n\n\n<p>Fires after markup of the navigation menu and the search unit for the mobile device.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2020\/07\/2020-07-06__1015x205__003.png\" alt=\"\" class=\"wp-image-1753\" width=\"1013\" height=\"205\" srcset=\"https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2020\/07\/2020-07-06__1015x205__003.png 1013w, https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2020\/07\/2020-07-06__1015x205__003-300x61.png 300w, https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2020\/07\/2020-07-06__1015x205__003-768x155.png 768w\" sizes=\"(max-width: 1013px) 100vw, 1013px\" \/><\/figure>\n\n\n<p>\u00a0<\/p>\n<p>In order to these Actions are works, should be enabled a toggle <em>&#8220;Search form type&#8221;<\/em> or <em>&#8220;Show WooCommerce minicart&#8221;<\/em> in the <code>Preset &gt; General &gt; General settings<\/code><\/p>\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * Fires as last menu action buttons. (after Search Icon \/ Woo Cart)\n \n *\n * @since 2.2.0\n *\/\ndo_action( 'gm_main_menu_actions_button_last' );<\/code><\/pre>\n\n\n\n<p>An example of use is given below. This code can be placed in the functions.php of your WordPress child theme.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'gm_main_menu_actions_button_last', 'custom_child_func__gm_main_menu_actions_button_last', 10 );\nif ( ! function_exists( 'custom_child_func__gm_main_menu_actions_button_last' ) ) {\n\tfunction custom_child_func__gm_main_menu_actions_button_last() {\n\t\t\/\/ Set the value of text variable (for example HTML) that will be displayed.\n\t\t$output = '[any custom html here]';\n\t\techo $output;\n\t}\n}<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>UPD:<\/strong> We added the possibility to add custom content shortcodes and raw HTML inside preset settings in the &#8220;General > Custom code&#8221; section<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1390\" height=\"868\" src=\"https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2021\/03\/general-custom-code.png\" alt=\"\" class=\"wp-image-2408\" srcset=\"https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2021\/03\/general-custom-code.png 1390w, https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2021\/03\/general-custom-code-300x187.png 300w, https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2021\/03\/general-custom-code-1024x639.png 1024w, https:\/\/grooni.com\/docs\/groovy-menu\/wp-content\/uploads\/sites\/3\/2021\/03\/general-custom-code-768x480.png 768w\" sizes=\"(max-width: 1390px) 100vw, 1390px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Overview The actions in the Groovy WordPress Mega Menu are created to execute custom code at the time the menu &hellip; <a href=\"https:\/\/grooni.com\/docs\/groovy-menu\/mega-menu-actions\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/pages\/1250"}],"collection":[{"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/comments?post=1250"}],"version-history":[{"count":0,"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/pages\/1250\/revisions"}],"wp:attachment":[{"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/media?parent=1250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}