{"id":2113,"date":"2021-01-15T13:39:05","date_gmt":"2021-01-15T13:39:05","guid":{"rendered":"https:\/\/grooni.com\/docs\/groovy-menu\/?page_id=2113"},"modified":"2021-01-18T16:04:35","modified_gmt":"2021-01-18T16:04:35","slug":"betheme","status":"publish","type":"page","link":"https:\/\/grooni.com\/docs\/groovy-menu\/theme-integration\/betheme\/","title":{"rendered":"BeTheme"},"content":{"rendered":"<p>Add this code into header.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>header.php<\/code><\/p>\n<pre><code>add_action( 'mfn_hook_top', 'gm_child_show_menu', 1 );\n\nif ( ! function_exists( 'gm_child_show_menu' ) ) {\n\tfunction gm_child_show_menu() {\n\t\tif ( function_exists( 'groovy_menu' ) ) {\n\t\t\tgroovy_menu();\n\t\t}\n\t}\n}\n<\/code><\/pre>\n<h2>BeTheme Child theme\u00a0with Groovy Menu\u00a0<\/h2>\n<div class=\"alert alert-warning\"><strong>Note:<\/strong> You can find archive with Child Theme for BeTheme inside the plugin, please follow to <code>Groovy Menu &gt; Integration<\/code> section to download it.<\/div>\n<p><code>header.php<\/code><\/p>\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/**\n * The Header for our theme.\n *\n * @package Betheme\n * @author Muffin group\n * @link https:\/\/muffingroup.com\n *\/\n?>&lt;!DOCTYPE html>\n&lt;?php\n    if ($_GET &amp;&amp; key_exists('mfn-rtl', $_GET)):\n\techo '&lt;html class=\"no-js\" lang=\"ar\" dir=\"rtl\">';\n    else:\n?>\n&lt;html &lt;?php language_attributes(); ?> class=\"no-js&lt;?php echo esc_attr(mfn_user_os()); ?>\"&lt;?php mfn_tag_schema(); ?>>\n&lt;?php endif; ?>\n\n&lt;head>\n\n&lt;meta charset=\"&lt;?php bloginfo('charset'); ?>\" \/>\n&lt;?php wp_head(); ?>\n\n&lt;\/head>\n\n&lt;body &lt;?php body_class(); ?>>\n\n    &lt;?php do_action('mfn_hook_top'); ?>\n\n    &lt;?php get_template_part('includes\/header', 'sliding-area'); ?>\n\n    &lt;?php\n\tif (mfn_header_style(true) == 'header-creative') {\n\t    get_template_part('includes\/header', 'creative');\n\t}\n    ?>\n\n    &lt;div id=\"Wrapper\">\n\n\t&lt;?php\n\n\t    \/\/ featured image: parallax\n\n\t    $class = '';\n\t    $data_parallax = array();\n\n\t    if (mfn_opts_get('img-subheader-attachment') == 'parallax') {\n\t\t$class = 'bg-parallax';\n\n\t\tif (mfn_opts_get('parallax') == 'stellar') {\n\t\t    $data_parallax['key'] = 'data-stellar-background-ratio';\n\t\t    $data_parallax['value'] = '0.5';\n\t\t} else {\n\t\t    $data_parallax['key'] = 'data-enllax-ratio';\n\t\t    $data_parallax['value'] = '0.3';\n\t\t}\n\t    }\n\t?>\n\n\t&lt;?php\n\t    if (mfn_header_style(true) == 'header-below') {\n\t\techo mfn_slider();\n\t    }\n\t?>\n\n\t&lt;div id=\"Header_wrapper\" class=\"&lt;?php echo esc_attr($class); ?>\" &lt;?php if ($data_parallax) {\n\t    printf('%s=\"%.1f\"', $data_parallax['key'], $data_parallax['value']);\n\t} ?>>\n\n\t    &lt;?php\n\t\tif ('mhb' == mfn_header_style()) {\n\n\t\t    \/\/ mfn_header action for header builder plugin\n\n\t\t    do_action('mfn_header');\n\t\t    echo mfn_slider();\n\n\t\t} else {\n\n\t\t    \/\/ EDITED: Remove header ----------------------------------------------------------- Begin\n\n\t\t    \/\/echo '&lt;header id=\"Header\">';\n\t\t\t\/\/if (mfn_header_style(true) != 'header-creative') {\n\t\t\t\/\/    get_template_part('includes\/header', 'top-area');\n\t\t\t\/\/}\n\t\t\t\/\/if (mfn_header_style(true) != 'header-below') {\n\t\t\t    echo mfn_slider();\n\t\t\t\/\/}\n\t\t\t\/\/echo '&lt;\/header>';\n\n\t\t\t\/\/ EDITED: Remove header ----------------------------------------------------------- End\n\n\t\t}\n\t    ?>\n\n\t    &lt;?php\n\t\tif ((mfn_opts_get('subheader') != 'all') &amp;&amp;\n\t\t    (! get_post_meta(mfn_ID(), 'mfn-post-hide-title', true)) &amp;&amp;\n\t\t    (get_post_meta(mfn_ID(), 'mfn-post-template', true) != 'intro')) {\n\n\t\t    $subheader_advanced = mfn_opts_get('subheader-advanced');\n\n\t\t    if (is_search()) {\n\n\t\t\techo '&lt;div id=\"Subheader\">';\n\t\t\t    echo '&lt;div class=\"container\">';\n\t\t\t\techo '&lt;div class=\"column one\">';\n\n\t\t\t\t    if (trim($_GET['s'])) {\n\t\t\t\t\tglobal $wp_query;\n\t\t\t\t\t$total_results = $wp_query->found_posts;\n\t\t\t\t    } else {\n\t\t\t\t\t$total_results = 0;\n\t\t\t\t    }\n\n\t\t\t\t    $translate['search-results'] = mfn_opts_get('translate') ? mfn_opts_get('translate-search-results', 'results found for:') : __('results found for:', 'betheme');\n\t\t\t\t    echo '&lt;h1 class=\"title\">'. esc_html($total_results) .' '. esc_html($translate['search-results']) .' '. esc_html($_GET['s']) .'&lt;\/h1>';\n\n\t\t\t\techo '&lt;\/div>';\n\t\t\t    echo '&lt;\/div>';\n\t\t\techo '&lt;\/div>';\n\n\t\t    } elseif (! mfn_slider_isset() || (is_array($subheader_advanced) &amp;&amp; isset($subheader_advanced['slider-show']))) {\n\n\t\t\t\/\/ subheader\n\n\t\t\t$subheader_options = mfn_opts_get('subheader');\n\n\t\t\tif (is_home() &amp;&amp; ! get_option('page_for_posts') &amp;&amp; ! mfn_opts_get('blog-page')) {\n\t\t\t    $subheader_show = false;\n\t\t\t} elseif (is_array($subheader_options) &amp;&amp; isset($subheader_options[ 'hide-subheader' ])) {\n\t\t\t    $subheader_show = false;\n\t\t\t} elseif (get_post_meta(mfn_ID(), 'mfn-post-hide-title', true)) {\n\t\t\t    $subheader_show = false;\n\t\t\t} else {\n\t\t\t    $subheader_show = true;\n\t\t\t}\n\n\t\t\t\/\/ title\n\n\t\t\tif (is_array($subheader_options) &amp;&amp; isset($subheader_options[ 'hide-title' ])) {\n\t\t\t    $title_show = false;\n\t\t\t} else {\n\t\t\t    $title_show = true;\n\t\t\t}\n\n\t\t\t\/\/ breadcrumbs\n\n\t\t\tif (is_array($subheader_options) &amp;&amp; isset($subheader_options[ 'hide-breadcrumbs' ])) {\n\t\t\t    $breadcrumbs_show = false;\n\t\t\t} else {\n\t\t\t    $breadcrumbs_show = true;\n\t\t\t}\n\n\t\t\tif (is_array($subheader_advanced) &amp;&amp; isset($subheader_advanced[ 'breadcrumbs-link' ])) {\n\t\t\t    $breadcrumbs_link = 'has-link';\n\t\t\t} else {\n\t\t\t    $breadcrumbs_link = 'no-link';\n\t\t\t}\n\n\t\t\t\/\/ output\n\n\t\t\tif ($subheader_show) {\n\n\t\t\t    echo '&lt;div id=\"Subheader\">';\n\t\t\t\techo '&lt;div class=\"container\">';\n\t\t\t\t    echo '&lt;div class=\"column one\">';\n\n\t\t\t\t\tif ($title_show) {\n\t\t\t\t\t    $title_tag = mfn_opts_get('subheader-title-tag', 'h1');\n\t\t\t\t\t    echo '&lt;'. esc_attr($title_tag) .' class=\"title\">'. wp_kses(mfn_page_title(), mfn_allowed_html()) .'&lt;\/'. esc_attr($title_tag) .'>';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($breadcrumbs_show) {\n\t\t\t\t\t    mfn_breadcrumbs($breadcrumbs_link);\n\t\t\t\t\t}\n\n\t\t\t\t    echo '&lt;\/div>';\n\t\t\t\techo '&lt;\/div>';\n\t\t\t    echo '&lt;\/div>';\n\n\t\t\t}\n\t\t    }\n\t\t}\n\t    ?>\n\n\t&lt;\/div>\n\n\t&lt;?php\n\t    if (get_post_meta(mfn_ID(), 'mfn-post-template', true) == 'intro') {\n\t\tget_template_part('includes\/header', 'single-intro');\n\t    }\n\t?>\n\n\t&lt;?php do_action('mfn_hook_content_before');\n<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><code>header-shop.php<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/**\n * The Header for our theme.\n *\n * @package Betheme\n * @author Muffin group\n * @link https:\/\/muffingroup.com\n *\/\n?>&lt;!DOCTYPE html>\n&lt;?php\n\tif ($_GET &amp;&amp; key_exists('mfn-rtl', $_GET)):\n\t\techo '&lt;html class=\"no-js\" lang=\"ar\" dir=\"rtl\">';\n\telse:\n?>\n&lt;html &lt;?php language_attributes(); ?> class=\"no-js&lt;?php echo esc_attr(mfn_user_os()); ?>\"&lt;?php mfn_tag_schema(); ?>>\n&lt;?php endif; ?>\n\n&lt;head>\n\n&lt;meta charset=\"&lt;?php bloginfo('charset'); ?>\" \/>\n&lt;?php wp_head(); ?>\n\n&lt;\/head>\n\n&lt;body &lt;?php body_class(); ?>>\n\n\t&lt;?php do_action('mfn_hook_top'); ?>\n\n\t&lt;?php get_template_part('includes\/header', 'sliding-area'); ?>\n\n\t&lt;?php\n\t\tif (mfn_header_style(true) == 'header-creative') {\n\t\t\tget_template_part('includes\/header', 'creative');\n\t\t}\n\t?>\n\n\t&lt;div id=\"Wrapper\">\n\n\t\t&lt;?php\n\n\t\t\t\/\/ featured image: parallax\n\n\t\t\t$class = '';\n\t\t\t$data_parallax = array();\n\n\t\t\tif (mfn_opts_get('img-subheader-attachment') == 'parallax') {\n\t\t\t\t$class = 'bg-parallax';\n\n\t\t\t\tif (mfn_opts_get('parallax') == 'stellar') {\n\t\t\t\t\t$data_parallax['key'] = 'data-stellar-background-ratio';\n\t\t\t\t\t$data_parallax['value'] = '0.5';\n\t\t\t\t} else {\n\t\t\t\t\t$data_parallax['key'] = 'data-enllax-ratio';\n\t\t\t\t\t$data_parallax['value'] = '0.3';\n\t\t\t\t}\n\t\t\t}\n\t\t?>\n\n\t\t&lt;?php\n\t\t\t$shop_id = wc_get_page_id('shop');\n\n\t\t\tif (mfn_header_style(true) == 'header-below') {\n\t\t\t\tif (is_shop() || (mfn_opts_get('shop-slider') == 'all')) {\n\t\t\t\t\techo mfn_slider($shop_id);\n\t\t\t\t}\n\t\t\t}\n\t\t?>\n\n\t\t&lt;div id=\"Header_wrapper\" class=\"&lt;?php echo esc_attr($class); ?>\" &lt;?php if ($data_parallax) {\n\t\t\tprintf('%s=\"%.1f\"', $data_parallax['key'], $data_parallax['value']);\n\t\t} ?>>\n\n\t\t\t&lt;?php\n\t\t\t\tif ('mhb' == mfn_header_style()) {\n\n\t\t\t\t\t\/\/ mfn_header action for header builder plugin\n\n\t\t\t\t\tdo_action('mfn_header');\n\t\t\t\t\tif (is_shop() || (mfn_opts_get('shop-slider') == 'all')) {\n\t\t\t\t\t\techo mfn_slider($shop_id);\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t\/\/ EDITED: Remove header ----------------------------------------------------------- Begin\n\n\t\t\t\t\t\/\/echo '&lt;header id=\"Header\">';\n\t\t\t\t\t\/\/if (mfn_header_style(true) != 'header-creative') {\n\t\t\t\t\t\/\/\tget_template_part('includes\/header', 'top-area');\n\t\t\t\t\t\/\/}\n\t\t\t\t\tif (mfn_header_style(true) != 'header-below') {\n\t\t\t\t\t\tif (is_shop() || (mfn_opts_get('shop-slider') == 'all')) {\n\t\t\t\t\t\t\techo mfn_slider($shop_id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\/\/echo '&lt;\/header>';\n\n\t\t\t\t\t\/\/ EDITED: Remove header ----------------------------------------------------------- End\n\n\t\t\t\t}\n\t\t\t?>\n\n\t\t\t&lt;?php\n\t\t\t\tfunction mfn_woocommerce_show_page_title()\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tadd_filter('woocommerce_show_page_title', 'mfn_woocommerce_show_page_title');\n\n\t\t\t\t$subheader_advanced = mfn_opts_get('subheader-advanced');\n\n\t\t\t\tif (! mfn_slider_isset($shop_id) || is_product() || (is_array($subheader_advanced) &amp;&amp; isset($subheader_advanced['slider-show']))) {\n\n\t\t\t\t\t\/\/ subheader\n\n\t\t\t\t\t$subheader_options = mfn_opts_get('subheader');\n\n\t\t\t\t\tif (is_array($subheader_options) &amp;&amp; isset($subheader_options['hide-subheader'])) {\n\t\t\t\t\t\t$subheader_show = false;\n\t\t\t\t\t} elseif (get_post_meta(mfn_ID(), 'mfn-post-hide-title', true)) {\n\t\t\t\t\t\t$subheader_show = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$subheader_show = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t\/\/ title\n\n\t\t\t\t\tif (is_array($subheader_options) &amp;&amp; isset($subheader_options[ 'hide-title' ])) {\n\t\t\t\t\t\t$title_show = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$title_show = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t\/\/ breadcrumbs\n\n\t\t\t\t\tif (is_array($subheader_options) &amp;&amp; isset($subheader_options['hide-breadcrumbs'])) {\n\t\t\t\t\t\t$breadcrumbs_show = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$breadcrumbs_show = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t\/\/ output\n\n\t\t\t\t\tif ($subheader_show) {\n\n\t\t\t\t\t\techo '&lt;div id=\"Subheader\">';\n\t\t\t\t\t\t\techo '&lt;div class=\"container\">';\n\t\t\t\t\t\t\t\techo '&lt;div class=\"column one\">';\n\n\t\t\t\t\t\t\t\t\tif ($title_show) {\n\n\t\t\t\t\t\t\t\t\t\t$title_tag = mfn_opts_get('subheader-title-tag', 'h1');\n\n\t\t\t\t\t\t\t\t\t\t\/\/ single product can not use H1\n\t\t\t\t\t\t\t\t\t\tif (is_product() &amp;&amp; $title_tag == 'h1') {\n\t\t\t\t\t\t\t\t\t\t\t$title_tag = 'h2';\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo '&lt;'. esc_attr($title_tag) .' class=\"title\">';\n\t\t\t\t\t\t\t\t\t\t\tif (is_product() &amp;&amp; mfn_opts_get('shop-product-title')) {\n\t\t\t\t\t\t\t\t\t\t\t\tthe_title();\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\twoocommerce_page_title();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\techo '&lt;\/'. esc_attr($title_tag) .'>';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ($breadcrumbs_show) {\n\t\t\t\t\t\t\t\t\t\t$home = mfn_opts_get('translate') ? mfn_opts_get('translate-home', 'Home') : __('Home', 'betheme');\n\t\t\t\t\t\t\t\t\t\t$woo_crumbs_args = apply_filters('woocommerce_breadcrumb_defaults', array(\n\t\t\t\t\t\t\t\t\t\t\t'delimiter' => false,\n\t\t\t\t\t\t\t\t\t\t\t'wrap_before' => '&lt;ul class=\"breadcrumbs woocommerce-breadcrumb\">',\n\t\t\t\t\t\t\t\t\t\t\t'wrap_after' => '&lt;\/ul>',\n\t\t\t\t\t\t\t\t\t\t\t'before' => '&lt;li>',\n\t\t\t\t\t\t\t\t\t\t\t'after' => '&lt;span>&lt;i class=\"icon-right-open\">&lt;\/i>&lt;\/span>&lt;\/li>',\n\t\t\t\t\t\t\t\t\t\t\t'home' => esc_html($home),\n\t\t\t\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\t\t\t\twoocommerce_breadcrumb($woo_crumbs_args);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\techo '&lt;\/div>';\n\t\t\t\t\t\t\techo '&lt;\/div>';\n\t\t\t\t\t\techo '&lt;\/div>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t?>\n\n\t\t&lt;\/div>\n\n\t\t&lt;?php do_action('mfn_hook_content_before');\n<\/code><\/pre>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<p><code>functions.php<\/code><\/p>\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/**\n * Betheme Child Theme\n *\n * @package Betheme Child Theme\n * @author Muffin group\n * @link https:\/\/muffingroup.com\n *\/\n\n\/**\n * Child Theme constants\n * You can change below constants\n *\/\n\n\/\/ white label\n\ndefine('WHITE_LABEL', false);\n\n\/**\n * Enqueue Styles\n *\/\n\nfunction mfnch_enqueue_styles()\n{\n\t\/\/ enqueue the parent stylesheet\n\t\/\/ however we do not need this if it is empty\n\t\/\/ wp_enqueue_style('parent-style', get_template_directory_uri() .'\/style.css');\n\n\t\/\/ enqueue the parent RTL stylesheet\n\n\tif (is_rtl()) {\n\t\twp_enqueue_style('mfn-rtl', get_template_directory_uri() . '\/rtl.css');\n\t}\n\n\t\/\/ enqueue the child stylesheet\n\n\twp_dequeue_style('style');\n\twp_enqueue_style('style', get_stylesheet_directory_uri() .'\/style.css');\n}\nadd_action('wp_enqueue_scripts', 'mfnch_enqueue_styles', 101);\n\n\/**\n * Load Textdomain\n *\/\n\nfunction mfnch_textdomain()\n{\n\tload_child_theme_textdomain('betheme', get_stylesheet_directory() . '\/languages');\n\tload_child_theme_textdomain('mfn-opts', get_stylesheet_directory() . '\/languages');\n}\nadd_action('after_setup_theme', 'mfnch_textdomain');\n\n\/\/ ----------------------------------------------------------\n\/\/ -------- Add Groovy Menu integration function. -----------\n\/\/ ----------------------------------------------------------\nadd_action( 'mfn_hook_top', 'gm_child_show_menu', 1 );\n\nif ( ! function_exists( 'gm_child_show_menu' ) ) {\n\tfunction gm_child_show_menu() {\n\t\tif ( function_exists( 'groovy_menu' ) ) {\n\t\t\tgroovy_menu();\n\t\t}\n\t}\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Add this code into header.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\/betheme\/\">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\/2113"}],"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=2113"}],"version-history":[{"count":0,"href":"https:\/\/grooni.com\/docs\/groovy-menu\/wp-json\/wp\/v2\/pages\/2113\/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=2113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}