'social-icon', 'container_class' => 'social-links', )); } /** * Search Bar and Mini Cart */ function blog_aarambha_search_bar_cart(){ if (class_exists( 'WooCommerce' )): ?> cart->get_cart_contents_count()); ?>
'
', 'after_widget' => '
' ]; the_widget( 'WC_Widget_Cart','', $args ); ?>
'header', 'container_class' => 'top-header-menu', 'menu_class' => 'top-header-menu', )); } /** * Phone and Address */ function blog_aarambha_phone_address(){ $number = get_theme_mod('top_header_section_number',''); $address = get_theme_mod('top_header_section_address',''); ?>
'primary', 'container_class' => 'left-menu', 'menu_class' => esc_attr($arg) )); } /** * Secondary Menus */ function blog_aarambha_secondary_menu(){ if (wp_is_mobile()){ return; } if (has_nav_menu('secondary')){ $arg = 'menu'; }else{ $arg = 'left-menu'; } wp_nav_menu(array( 'theme_location' => 'secondary', 'container_class' => 'left-menu', 'menu_class' => esc_attr($arg) )); } /** * Logo Section */ function blog_aarambha_logo(){ ?>

'footer', 'container_class' => 'footer-menu', 'menu_class' => esc_attr($arg) )); } /** * Header Title */ function blog_aarambha_header_title(){ if(is_archive()){ the_archive_title(); }elseif(!empty(get_the_title())){ the_title(); }else{ esc_html_e( 'Nothing Found', 'blog-aarambha' ); } } /** * Body Class * @param $classes * @return mixed */ function blog_aarambha_body_classes($classes){ $sidebar = blog_aarambha_sidebar(); if($sidebar){ $classes[] = esc_attr($sidebar); } if (is_home() && !is_front_page()){ $classes[] = 'home-template'; } if (get_theme_mod('slider_section_checkbox',false) == false && is_home() && is_front_page()){ $classes[] = 'slider-disable'; } if(get_theme_mod('slider_section_checkbox',false) == true && is_home() && is_front_page()){ $classes[] = 'slider-enable'; } if (class_exists( 'WooCommerce' )) { $classes[] = 'woocommerce'; } return $classes; } add_filter('body_class' , 'blog_aarambha_body_classes'); if ( ! function_exists( 'blog_aarambha_get_meta' ) ): /* * Custom function to get the meta * */ function blog_aarambha_get_meta( $post_id, $key, $default = null ) { $value = get_post_meta( $post_id, $key, true ); if ( ! $value ) { $value = $default; } return $value; } endif; /** * Register the required plugins for this theme. * * This function is hooked into `tgmpa_register`, which is fired on the WP `init` action on priority 10. */ function blog_aarambha_register_required_plugins() { /* * Array of plugin arrays. Required keys are name and slug. * If the source is NOT from the .org repo, then source is also required. */ $plugins = array( array( 'name' => esc_html__( 'Aarambha Demo Sites', 'blog-aarambha' ), //The plugin name 'slug' => 'aarambha-demo-sites', // The plugin slug (typically the folder name) 'required' => false, // If false, the plugin is only 'recommended' instead of required. 'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. ), ); $config = array( 'id' => 'blog-aarambha', // Unique ID for hashing notices for multiple instances of TGMPA. 'default_path' => '', // Default absolute path to bundled plugins. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => false, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. ); tgmpa( $plugins, $config ); } add_action( 'tgmpa_register', 'blog_aarambha_register_required_plugins' );