__( 'Main Menu', 'maxstore' ), ) ); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 300, 300, true ); add_image_size( 'maxstore-single', 848, 400, true ); add_image_size( 'maxstore-home-top', 300, 300, true ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'woocommerce' ); if ( get_theme_mod( 'woo_gallery_zoom', 0 ) == 1 ) { add_theme_support( 'wc-product-gallery-zoom' ); } if ( get_theme_mod( 'woo_gallery_lightbox', 1 ) == 1 ) { add_theme_support( 'wc-product-gallery-lightbox' ); } if ( get_theme_mod( 'woo_gallery_slider', 0 ) == 1 ) { add_theme_support( 'wc-product-gallery-slider' ); } } endif; //////////////////////////////////////////////////////////////////// // Enqueue Styles (normal style.css and bootstrap.css) //////////////////////////////////////////////////////////////////// function maxstore_theme_stylesheets() { wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), '3.3.4', 'all' ); wp_enqueue_style( 'maxstore-stylesheet', get_stylesheet_uri(), array(), '1.4.0', 'all' ); // load Font Awesome css wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '4.7' ); } add_action( 'wp_enqueue_scripts', 'maxstore_theme_stylesheets' ); //////////////////////////////////////////////////////////////////// // Register Bootstrap JS with jquery //////////////////////////////////////////////////////////////////// function maxstore_theme_js() { wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.js', array( 'jquery' ), '3.3.4' ); wp_enqueue_script( 'maxstore-theme-js', get_template_directory_uri() . '/js/customscript.js', array( 'jquery' ), '1.4.0' ); } add_action( 'wp_enqueue_scripts', 'maxstore_theme_js' ); //////////////////////////////////////////////////////////////////// // Register Custom Navigation Walker include custom menu widget to use walkerclass //////////////////////////////////////////////////////////////////// require_once(trailingslashit( get_template_directory() ) . 'lib/wp_bootstrap_navwalker.php'); //////////////////////////////////////////////////////////////////// // Register Widgets //////////////////////////////////////////////////////////////////// add_action( 'widgets_init', 'maxstore_widgets_init' ); function maxstore_widgets_init() { register_sidebar( array( 'name' => __( 'Right Sidebar', 'maxstore' ), 'id' => 'maxstore-right-sidebar', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

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

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Section', 'maxstore' ), 'id' => 'maxstore-footer-area', 'description' => __( 'Content Footer Section', 'maxstore' ), '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( 'maxstore_main_content_width_hook', 'maxstore_main_content_width_columns' ); function maxstore_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 $columns; } function maxstore_main_content_width() { do_action( 'maxstore_main_content_width_hook' ); } //////////////////////////////////////////////////////////////////// // Set Content Width //////////////////////////////////////////////////////////////////// function maxstore_content_width() { $GLOBALS['content_width'] = apply_filters( 'maxstore_content_width', 800 ); } add_action( 'after_setup_theme', 'maxstore_content_width', 0 ); //////////////////////////////////////////////////////////////////// // Theme Info page //////////////////////////////////////////////////////////////////// if ( is_admin() && !is_child_theme() ) { include_once(trailingslashit( get_template_directory() ) . 'lib/welcome/welcome-screen.php'); } if ( !function_exists( 'maxstore_breadcrumb' ) ) : //////////////////////////////////////////////////////////////////// // Breadcrumbs //////////////////////////////////////////////////////////////////// function maxstore_breadcrumb() { global $post, $wp_query; $home = esc_html_x( 'Home', 'breadcrumb', 'maxstore' ); $delimiter = ' » '; $homeLink = home_url(); if ( is_home() || is_front_page() ) { // no need for breadcrumbs in homepage } else { echo ''; } } endif; //////////////////////////////////////////////////////////////////// // Social links //////////////////////////////////////////////////////////////////// if ( !function_exists( 'maxstore_social_links' ) ) : /** * This function is for social links display on header * * Get links through Theme Options */ function maxstore_social_links() { $twp_social_links = array( 'twp_social_facebook' => 'facebook', 'twp_social_twitter' => 'twitter', 'twp_social_google' => 'google-plus', 'twp_social_instagram' => 'instagram', 'twp_social_pin' => 'pinterest', 'twp_social_youtube' => 'youtube', 'twp_social_reddit' => 'reddit', 'twp_social_linkedin' => 'linkedin', 'twp_social_skype' => 'skype', 'twp_social_vimeo' => 'vimeo', 'twp_social_flickr' => 'flickr', 'twp_social_dribble' => 'dribbble', 'twp_social_envelope-o' => 'envelope-o', 'twp_social_rss' => 'rss', ); ?> cart->get_cart_contents_count() ); ?>cart->get_cart_subtotal() ); ?> get_wishlist_url(); ?>
get_id() ); $id = $product->get_id(); $wishlist_url = YITH_WCWL()->get_wishlist_url(); ?>
loading
' » ', 'wrap_before' => '', 'before' => '', 'after' => '', 'home' => esc_html_x( 'Home', 'woocommerce breadcrumb', 'maxstore' ), ); } add_filter( 'woocommerce_breadcrumb_defaults', 'maxstore_woocommerce_breadcrumbs' ); } //////////////////////////////////////////////////////////////////// // WooCommerce end //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Excerpt functions //////////////////////////////////////////////////////////////////// function maxstore_excerpt_length( $length ) { if ( is_single() ) { return 15; } else { return 40; } } add_filter( 'excerpt_length', 'maxstore_excerpt_length', 999 ); function maxstore_excerpt_more( $more ) { return '…'; } add_filter( 'excerpt_more', 'maxstore_excerpt_more' );