100, 'width' => 400, 'flex-height' => true, 'flex-width' => true, ) ); // Register Menus register_nav_menus( array( 'top_menu' => __( 'Top Menu', 'giga-store' ), 'main_menu' => __( 'Main Menu', 'giga-store' ), 'footer_menu' => __( 'Footer Menu', 'giga-store' ), ) ); // Add support for a featured image and the size add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 300, 300, true ); add_image_size( 'giga-store-home', 400, 300, true ); add_image_size( 'giga-store-square', 400, 400, true ); add_image_size( 'giga-store-single', 1600, 400, true ); // Add Custom Background Support $args = array( 'default-color' => 'FFFFFF', ); add_theme_support( 'custom-background', $args ); // Adds RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); // WooCommerce support add_theme_support( 'woocommerce' ); } endif; // Set Content Width function giga_store_content_width() { $GLOBALS['content_width'] = apply_filters( 'giga_store_content_width', 1170 ); } add_action( 'after_setup_theme', 'giga_store_content_width', 0 ); //////////////////////////////////////////////////////////////////// // Enqueue Styles (normal style.css and bootstrap.css) //////////////////////////////////////////////////////////////////// function giga_store_theme_stylesheets() { wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), '3.3.6' ); wp_enqueue_style( 'giga-store-stylesheet', get_stylesheet_uri(), array(), '1.0.4', 'all' ); wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '4.6.3' ); wp_enqueue_style( 'flexslider', get_template_directory_uri() . '/css/flexslider.css', array(), '2.6.0' ); wp_enqueue_style( 'of-canvas-menu', get_template_directory_uri() . '/css/jquery.mmenu.all.css', array(), '5.5.3' ); wp_enqueue_style( 'animate', get_template_directory_uri() . '/css/animate.min.css', array(), '3.5.1' ); } add_action( 'wp_enqueue_scripts', 'giga_store_theme_stylesheets' ); //////////////////////////////////////////////////////////////////// // Register Bootstrap JS with jquery //////////////////////////////////////////////////////////////////// function giga_store_theme_js() { wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true ); wp_enqueue_script( 'giga-store-theme-js', get_template_directory_uri() . '/js/customscript.js', array( 'jquery' ), '1.0.2', true ); wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array( 'jquery' ), '2.6.0', true ); wp_enqueue_script( 'of-canvas-menu', get_template_directory_uri() . '/js/jquery.mmenu.min.all.js', array( 'jquery' ), '5.5.3', true ); } add_action( 'wp_enqueue_scripts', 'giga_store_theme_js' ); //////////////////////////////////////////////////////////////////// // Register Custom Navigation Walker include custom menu widget to use walkerclass //////////////////////////////////////////////////////////////////// require_once( trailingslashit( get_template_directory() ) . 'lib/wp_bootstrap_navwalker.php' ); //////////////////////////////////////////////////////////////////// // Theme Info page //////////////////////////////////////////////////////////////////// if ( is_admin() ) { require_once( trailingslashit( get_template_directory() ) . 'lib/theme-info.php' ); } //////////////////////////////////////////////////////////////////// // Register the Sidebar(s) //////////////////////////////////////////////////////////////////// add_action( 'widgets_init', 'giga_store_widgets_init' ); function giga_store_widgets_init() { register_sidebar( array( 'name' => __( 'Right Sidebar', 'giga-store' ), 'id' => 'giga-store-right-sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Left Sidebar', 'giga-store' ), 'id' => 'giga-store-left-sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Section', 'giga-store' ), 'id' => 'giga-store-footer-area', 'description' => __( 'Content Footer Section', 'giga-store' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } //////////////////////////////////////////////////////////////////// // Register hook and action to set Main content area col-md- width based on sidebar declarations //////////////////////////////////////////////////////////////////// add_action( 'giga_store_main_content_width_hook', 'giga_store_main_content_width_columns' ); function giga_store_main_content_width_columns() { $columns = '12'; if ( get_theme_mod( 'rigth-sidebar-check', 1 ) != 0 ) { $columns = $columns - absint( get_theme_mod( 'right-sidebar-size', 3 ) ); } if ( get_theme_mod( 'left-sidebar-check', 0 ) != 0 ) { $columns = $columns - absint( get_theme_mod( 'left-sidebar-size', 3 ) ); } echo absint( $columns ); } //////////////////////////////////////////////////////////////////// // Social links //////////////////////////////////////////////////////////////////// if ( !function_exists( 'giga_store_social_links' ) ) : function giga_store_social_links() { $twp_social_links = array( 'facebook' => esc_html__( 'Facebook', 'giga-store' ), 'twitter' => esc_html__( 'Twitter', 'giga-store' ), 'google-plus' => esc_html__( 'Google-Plus', 'giga-store' ), 'instagram' => esc_html__( 'Instagram', 'giga-store' ), 'pinterest-p' => esc_html__( 'Pinterest', 'giga-store' ), 'youtube' => esc_html__( 'YouTube', 'giga-store' ), 'reddit' => esc_html__( 'Reddit', 'giga-store' ), 'linkedin' => esc_html__( 'LinkedIn', 'giga-store' ), 'vimeo' => esc_html__( 'Vimeo', 'giga-store' ), 'envelope-o' => esc_html__( 'Email', 'giga-store' ), ); ?> " . $content . ""; } add_filter( 'comment_text', 'giga_store_comment_text', 1000 ); //////////////////////////////////////////////////////////////////// // WooCommerce section //////////////////////////////////////////////////////////////////// if ( class_exists( 'WooCommerce' ) ) { //////////////////////////////////////////////////////////////////// // WooCommerce header cart //////////////////////////////////////////////////////////////////// if ( !function_exists( 'giga_store_cart_link' ) ) { function giga_store_cart_link() { ?> cart->get_cart_contents_count() ); ?>
cart->get_cart_subtotal() ); ?>
get_wishlist_url(); ?>
' » ', 'wrap_before' => '', 'before' => '', 'after' => '', 'home' => esc_html_x( 'Home', 'breadcrumb', 'giga-store' ), ); } }