{"id":2107,"date":"2021-01-15T13:34:05","date_gmt":"2021-01-15T13:34:05","guid":{"rendered":"https:\/\/grooni.com\/docs\/groovy-menu\/?page_id=2107"},"modified":"2021-01-16T06:03:44","modified_gmt":"2021-01-16T06:03:44","slug":"avada","status":"publish","type":"page","link":"https:\/\/grooni.com\/docs\/groovy-menu\/theme-integration\/avada\/","title":{"rendered":"Avada"},"content":{"rendered":"<p>Add this code into function.php of your <a href=\"https:\/\/developer.wordpress.org\/themes\/advanced-topics\/child-themes\/\">child theme<\/a>.<\/p>\n<blockquote>\n<p>Please make all changes to the child theme files, and do not add the code directly to the theme files, otherwise after updating the theme your fixes will be lost<\/p>\n<\/blockquote>\n<p><code>function.php<\/code><\/p>\n<pre><code>\/\/ ------------------------------------------------------\n\/\/         Groovy Menu plugin integration\n\/\/ ------------------------------------------------------\n\n\/\/ Add hook for 'avada_before_body_content' action.\nadd_action( 'avada_before_body_content', 'gm_custom_child_show_groovy_menu', 1 );\n\nif ( ! function_exists( 'gm_custom_child_show_groovy_menu' ) ) {\n\tfunction gm_custom_child_show_groovy_menu() {\n\t\tif ( function_exists( 'groovy_menu' ) ) {\n\t\t\tgroovy_menu();\n\n\t\t\t\/\/ Start output buffering.\n\t\t\tadd_action( 'avada_before_header_wrapper', 'gm_custom_avada_child_theme_integration__start_cache', 0 );\n\t\t\t\/\/ Finish output buffering with clear.\n\t\t\tadd_action( 'avada_after_header_wrapper', 'gm_custom_avada_child_theme_integration__clear_cache', 999999 );\n\t\t}\n\t}\n}\n\nif ( ! function_exists( 'gm_custom_avada_child_theme_integration__start_cache' ) ) {\n\tfunction gm_custom_avada_child_theme_integration__start_cache() {\n\t\tob_start();\n\t}\n}\n\nif ( ! function_exists( 'gm_custom_avada_child_theme_integration__clear_cache' ) ) {\n\tfunction gm_custom_avada_child_theme_integration__clear_cache() {\n\t\t$cleared_html = ob_get_clean();\n\t\tunset( $cleared_html );\n\t}\n}\n<\/code><\/pre>\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<p><code>style.css<\/code><\/p>\n<pre><code>\n\/*\nTheme Name: Avada Child (GroovyMenu)\nTheme URI: http:\/\/avada.theme-fusion.com\/\nTemplate: Avada\nDescription: Avada Child theme with Groovy Menu plugin integration.\nAuthor: Grooni\nAuthor URI: https:\/\/grooni.com\/docs\/groovy-menu\/\nVersion: 1.1\n*\/\n\n.gm-search__fullscreen-container .gm-search__input {\n    margin: 0;\n}\n\n.gm-main-menu-wrapper .gm-minicart-dropdown .woocommerce-mini-cart__buttons {\n    background: transparent;\n}\n\n\/*\n.avada-responsive .gm-navbar-sticky-toggle .gm-wrapper {\n    padding-right: 9px !important;\n}\n*\/\n\n<\/code><\/pre>\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<div class=\"alert alert-warning\"><strong>Note:<\/strong> You can find the child theme for the Avada theme in the <code>Groovy Menu &gt; Integration<\/code> section<\/div>","protected":false},"excerpt":{"rendered":"<p>Add this code into function.php of your child theme. Please make all changes to the child theme files, and do &hellip; <a href=\"https:\/\/grooni.com\/docs\/groovy-menu\/theme-integration\/avada\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":2075,"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\/2107"}],"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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/comments?post=2107"}],"version-history":[{"count":0,"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/pages\/2107\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/pages\/2075"}],"wp:attachment":[{"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/media?parent=2107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}