tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); add_image_size( 'growup_image', 350,260, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'menu-1' => esc_html__( 'Primary', 'growup' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'growup_custom_background_args', array( 'default-color' => '#22262C', 'default-image' => get_template_directory_uri().'/img/bg.jpeg', ) ) ); // Heading Image Size add_theme_support( 'custom-header', apply_filters( 'growup_custom_header_args', array( 'width' => 1200, 'height' => 240, 'flex-height' => true, ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array('height'=> 250,'width'=> 250,'flex-width' => true, 'flex-height' => true,) ); } add_editor_style( array( 'css/editor-style.css', growup_google_fonts_url() ) ); endif; add_action( 'after_setup_theme', 'growup_theme_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function growup_content_width() { $GLOBALS['content_width'] = apply_filters( 'growup_content_width', 640 ); } add_action( 'after_setup_theme', 'growup_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function growup_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'growup' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'growup' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footercol1', 'growup' ), 'id' => 'footer-1', 'description' => esc_html__( 'Frist Footer section widgets.', 'growup' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footercol2', 'growup' ), 'id' => 'footer-2', 'description' => esc_html__( 'Second Footer section widgets.', 'growup' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Footercol3', 'growup' ), 'id' => 'footer-3', 'description' => esc_html__( 'Third Footer section widgets.', 'growup' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'growup_widgets_init' ); /** * Register Google Fonts */ function growup_google_fonts_url() { $fonts_url = ''; $font_families[] = 'Lato:200,300,300i,400,400i,500,600,700'; $font_families[] = 'Open+Sans:400italic,700italic,400,700'; $font_families[] = 'Roboto:400italic,700italic,400,700'; $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); return esc_url_raw( $fonts_url ); } /**** Enqueue scripts and styles. **********/ function growup_scripts() { //Css Files wp_enqueue_style( 'growup-google-fonts', growup_google_fonts_url(), array(), null ); wp_enqueue_style('bootstrap' , get_template_directory_uri(). '/css/bootstrap.min.css'); wp_enqueue_style('font-awesome' , get_template_directory_uri(). '/css/font-awesome.css'); wp_enqueue_style('meanmenu' , get_template_directory_uri(). '/css/meanmenu.css'); wp_enqueue_style('growup-style', get_stylesheet_uri() ); wp_enqueue_style('growup-slider' , get_template_directory_uri(). '/css/slider-style.css'); //JS files wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '6857', true ); wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.bundle.min.js', array('jquery'), '6857', true ); wp_enqueue_script( 'jquery-meanmenu', get_template_directory_uri() . '/js/jquery.meanmenu.js', array('jquery'), '6857', true ); wp_enqueue_script( 'growup-main', get_template_directory_uri() . '/js/main.js', array('jquery'), '6857', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'growup_scripts' ); // modify search widget function growup_my_search_form( $form ) { $form = ''; return $form; } add_filter( 'get_search_form', 'growup_my_search_form' ); // comment box title change add_filter( 'comment_form_defaults', 'growup_remove_comment_form_allowed_tags' ); function growup_remove_comment_form_allowed_tags( $defaults ) { $defaults['comment_notes_after'] = ''; $defaults['comment_notes_before'] = ''; return $defaults; } function growup_comment_reform ($arg) { $arg['title_reply'] = esc_html__('Write your comment Here','growup'); $arg['comment_field'] = '
'; return $arg; } add_filter('comment_form_defaults','growup_comment_reform'); // comment form modify function growup_modify_comment_form_fields($fields){ $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $fields['author'] = '
'; $fields['email'] = '
'; $fields['url'] = '
'; return $fields; } add_filter('comment_form_default_fields','growup_modify_comment_form_fields'); /***** Custom template tags for this theme. ********/ require get_template_directory() . '/inc/template-tags.php'; /*** Functions which enhance the theme by hooking into WordPress. ******/ require get_template_directory() . '/inc/template-functions.php'; /*** Customizer additions */ require get_template_directory() . '/inc/customizer.php'; require get_template_directory() . '/inc/custom-functions.php'; /** * Load Jetpack compatibility file. */ if ( defined( 'JETPACK__VERSION' ) ) { require get_template_directory() . '/inc/jetpack.php'; }