__('Main Menu', 'beauty-and-spa' ) ) ); add_theme_support( "title-tag" ); add_theme_support( 'woocommerce' ); add_theme_support( 'html5', array( 'search-form' ) ); // Set the content width based on the theme's design and stylesheet. global $content_width; if ( ! isset( $content_width ) ) $content_width = 784; // Tell WordPress for the Feed Link add_theme_support( 'automatic-feed-links' ); // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 150, 150, true ); // default Post Thumbnail dimensions (cropped) add_image_size( 'beautyandspa-fpage-thumb', 1100, 600, array( 'left', 'top' ) ); add_image_size( 'beautyandspa-fcontent', 100, 100, array( 'left', 'top' ) ); add_image_size( 'beautyandspa-fbox', 400, 400, array( 'left', 'top' ) ); } // WordPress Custom Background Support $beautyandspa_custom_background = array( 'default-color' => 'ffffff' ); add_theme_support( 'custom-background', $beautyandspa_custom_background ); add_theme_support( 'custom-logo', array( 'height' =>90, 'width' => 300, 'flex-width' => true, ) ); } add_action( 'after_setup_theme', 'beautyandspa_setup' ); // Functions for adding script function beautyandspa_enqueue_scripts() { wp_enqueue_style('beautyandspa-style', get_stylesheet_uri(), false ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } wp_enqueue_script( 'beautyandspa-menu-style', get_template_directory_uri(). '/js/menu.js', array( 'jquery' )); wp_register_style('beautyandspa-gfonts', '//fonts.googleapis.com/css?family=Anaheim|Advent+Pro:400,500,600,700', false ); wp_enqueue_style('beautyandspa-gfonts'); wp_enqueue_style('beautyandspa-fawesome', get_template_directory_uri(). '/css/font-awesome.css' ); wp_enqueue_script( 'beautyandspa-fheader', get_template_directory_uri(). '/js/fixedheader.js', array( 'jquery' )); wp_enqueue_script( 'beautyandspa-html5', get_template_directory_uri().'/js/html5.js'); wp_script_add_data( 'beautyandspa-html5', 'conditional', 'lt IE 9' ); if ( is_front_page() || is_page_template( 'front-page.php' ) ): wp_enqueue_script( 'beautyandspa-skitter-main', get_template_directory_uri() . '/js/jquery.skitter.js' , array( 'jquery', 'jquery-effects-core' ) ); wp_enqueue_style ('beautyandspa-skitter-style', get_template_directory_uri() . '/css/skitter.styles.css'); endif; wp_enqueue_style('beautyandspa-responsive', get_template_directory_uri(). '/style-responsive.css' ); } add_action( 'wp_enqueue_scripts', 'beautyandspa_enqueue_scripts' ); // Functions for adding script to Admin Area function beautyandspa_admin_style($hook) { if ( 'appearance_page_theme-about' != $hook ) { return; } wp_enqueue_style( 'beautyandspa_admin_css', get_template_directory_uri() . '/inc/admin-style.css', false ); } add_action( 'admin_enqueue_scripts', 'beautyandspa_admin_style' ); // Functions for adding Style to the Customizer function beautyandspa_customizer_styles() { ?> %2$s', esc_url( get_permalink( get_the_ID() ) ), /* translators: %s: Name of current post */ sprintf( __( 'Read More', 'beautyandspa' ), get_the_title( get_the_ID() ) ) ); return ' … ' . $link; } add_filter( 'excerpt_more', 'beautyandspa_excerpt_more' ); // Content Type Showing function beautyandspa_content() { if (( esc_attr(beautyandspa_get_option('contype', '2')) != '2' ) || is_page() || is_single() ) : the_content('' .__('Read More', 'beauty-and-spa') . ''); else: the_excerpt(); endif; } // Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link function beautyandspa_page_menu_args( $beautyandspa_args ) { $beautyandspa_args['show_home'] = true; return $beautyandspa_args; } add_filter( 'wp_page_menu_args', 'beautyandspa_page_menu_args' ); // Registers the Widgets and Sidebars for the site function beautyandspa_widgets_init() { register_sidebar( array( 'name' => __('Primary Sidebar', 'beauty-and-spa'), 'id' => 'sidebar-1', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Area One', 'beauty-and-spa'), 'id' => 'sidebar-3', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Area Two', 'beauty-and-spa'), 'id' => 'sidebar-4', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Area Three', 'beauty-and-spa'), 'id' => 'sidebar-5', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Area Four', 'beauty-and-spa'), 'id' => 'sidebar-6', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __('Footer Area Five', 'beauty-and-spa'), 'id' => 'sidebar-7', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'beautyandspa_widgets_init' ); add_filter('the_title', 'beautyandspa_title'); function beautyandspa_title($beautyandspa_title) { if ( '' == $beautyandspa_title ) { return __('(Untitled)', 'beauty-and-spa'); } else { return $beautyandspa_title; } }