110, 'width' => 250, 'flex-height' => false, 'flex-width' => false, ) ); // Add theme support for Custom Background $background_args = array( 'default-color' => 'ffffff', 'default-image' => '', 'default-repeat' => '', 'default-position-x' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-background', $background_args ); add_theme_support( 'post-thumbnails' ); //supports featured image //supports custom header add_theme_support( 'automatic-feed-links' ); $args = array( 'width' => 1200, 'height' => 800, 'uploads' => true, 'flex-width' => true, 'default-repeat' => '', 'flex-height' => true, 'default-image' => get_template_directory_uri() . '/images/3.jpg', ); add_theme_support( 'custom-header', $args ); //register theme Menu register_nav_menu( 'beautyspa-menu', esc_html__( 'Primary Menu','beautyspa' ) ); } add_action('wp_enqueue_scripts', 'beautyspa_enqueue_style'); function beautyspa_enqueue_style(){ //css wp_enqueue_style('bootstrap', get_stylesheet_directory_uri(). '/css/bootstrap.css'); wp_enqueue_style('fontAwesome', get_stylesheet_directory_uri(). '/css/font-awesome.css'); wp_enqueue_style('beautyspa-color', get_stylesheet_directory_uri(). '/css/color/default.css'); wp_enqueue_style('photobox', get_stylesheet_directory_uri(). '/css/photobox.css'); wp_enqueue_style('swiper', get_stylesheet_directory_uri(). '/css/swiper.css'); wp_enqueue_style('beautyspa-main-style', get_stylesheet_directory_uri(). '/style.css'); wp_enqueue_style('beautyspa-media-style', get_stylesheet_directory_uri(). '/css/media-query.css'); wp_enqueue_style('beautyspa-themeFont', 'https://fonts.googleapis.com/css?family=Tinos'); //js wp_enqueue_script('bootstrap', get_stylesheet_directory_uri(). '/js/bootstrap.js', array('jquery')); wp_enqueue_script('photobox', get_stylesheet_directory_uri(). '/js/jquery.photobox.js'); wp_enqueue_script('parallax', get_stylesheet_directory_uri(). '/js/jquery.parallax-1.1.3.js'); wp_enqueue_script('swiper', get_stylesheet_directory_uri(). '/js/swiper.js'); wp_enqueue_script('beautyspa-custom-script', get_stylesheet_directory_uri(). '/js/custom-script.js'); if ( is_singular() ){ wp_enqueue_script( "comment-reply" ); } } /***** Add Custom Image Sizes *****/ if (!function_exists('beautyspa_image_sizes')) { function beautyspa_image_sizes() { add_image_size('beautyspa-post-thumb', 800, 400, true); add_image_size('beautyspa-home-slider',1240,600,true); add_image_size('beautyspa-home-thumbnail',600,400,true); } } add_action('after_setup_theme', 'beautyspa_image_sizes'); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style('css/editor-style.css'); function beautyspa_default_settings(){ $beauty_theme_options=array( //'_frontpage' =>'', ); return apply_filters( 'beauty_options', $beauty_theme_options ); } function beautyspa_options() { // Options API return wp_parse_args( get_theme_mod( 'beauty_options' ), beautyspa_default_settings() ); } require( get_template_directory() . '/customizer.php' ); require( get_template_directory() . '/inc/custom-header.php' ); /****--- Navigation for Single ---***/ // post/page navigation function beautyspa_link_pages(){ $defaults = array( 'before' => '
' . esc_html__( 'Pages:','beautyspa' ), 'after' => '
', 'link_before' => '', 'link_after' => '', 'next_or_number' => 'number', 'separator' => ' ', 'nextpagelink' => esc_html__( 'Next page','beautyspa'), 'previouspagelink' => esc_html__( 'Previous page','beautyspa'), 'pagelink' => '%', 'echo' => 1 ); wp_link_pages( $defaults ); } // for menu function beautyspa_page_menu_args( $args ) { if ( ! isset( $args['show_home'] ) ){ $args['show_home'] = true; } return $args; } add_filter( 'wp_page_menu_args', 'beautyspa_page_menu_args' ); function beautyspa_fallback_page_menu( $args = array() ) { $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => ''); $args = wp_parse_args( $args, $defaults ); $args = apply_filters( 'wp_page_menu_args', $args ); $menu = ''; $list_args = $args; // Show Home in the menu if ( ! empty($args['show_home']) ) { if ( true === $args['show_home'] || '1' === $args['show_home'] || 1 === $args['show_home'] ){ $text = esc_html__('Home','beautyspa'); }else{ $text = $args['show_home']; } $class = ''; if ( is_front_page() && !is_paged() ){ $class = 'class="current_page_item"'; } $menu .= '