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' ); // image size add_image_size( 'rallypro_frontPageImg', 555, 286, true ); add_image_size( 'rallypro_mainPageImg', 1140, 600, true ); //adding custom field support globally add_theme_support( 'custom-fields' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primarymenu' => esc_html__( 'Primary', 'rallypro' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'rallypro_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); } endif; add_action( 'after_setup_theme', 'rallypro_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 rallypro_content_width() { $GLOBALS['content_width'] = apply_filters( 'rallypro_content_width', 640 ); } add_action( 'after_setup_theme', 'rallypro_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function rallypro_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar' , 'rallypro' ), 'id' => 'sidebar', 'description' => esc_html__( 'Add widgets here.', 'rallypro' ), 'before_widget' => '
', 'before_title' => ' ', ) ); register_sidebar( array( 'name' => esc_html__( 'Sub Footer Contact Us' , 'rallypro' ), 'id' => 'contact-us', 'description' => esc_html__( 'Add widgets here.', 'rallypro' ), 'before_widget' => ' ', 'before_title' => ' ', ) ); register_sidebar( array( 'name' => esc_html__( 'Sub Footer About Us' , 'rallypro' ), 'id' => 'about-us', 'description' => esc_html__( 'Add widgets here.', 'rallypro' ), 'before_widget' => ' ', 'before_title' => ' ', ) ); register_sidebar( array( 'name' => esc_html__( 'Post Below' , 'rallypro' ), 'id' => 'post-below', 'description' => esc_html__( 'Add widgets here.', 'rallypro' ), 'before_widget' => 'Must be required * marked fields.
', 'rallypro' ); return $defaults; } add_filter( 'comment_form_defaults', 'rallypro_comment_form_defaults' ); //add class in next_posts_link and previous_posts_link add_filter('next_posts_link_attributes', 'rallypro_posts_link_attributes_1'); add_filter('previous_posts_link_attributes', 'rallypro_posts_link_attributes_2'); function rallypro_posts_link_attributes_1() { return 'class="btn"'; } function rallypro_posts_link_attributes_2() { return 'class="btn"'; } /** * Registers an editor stylesheet for the theme. */ function rallypro_theme_add_editor_styles() { add_editor_style( get_template_directory().'/css/custom-editor-style.css' ); } add_action( 'admin_init', 'rallypro_theme_add_editor_styles' ); /** * To mute migrate console error */ add_action( 'wp_default_scripts', 'rallypro_jquery_migrate' ) ; function rallypro_jquery_migrate($scripts){ if ( ! empty( $scripts->registered['jquery'] ) ) { $scripts->registered['jquery']->deps = array_diff( $scripts->registered['jquery']->deps, array( 'jquery-migrate' ) ); } } /** * Implement the Custom Header feature. */ //require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Additional features to allow styling of the templates. */ require get_template_directory() . '/inc/template-functions.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; // Register Custom Navigation Walker require get_template_directory() . '/inc/rallypro-bootstrap-navwalker.php'; //Titan framework checker require get_template_directory() . '/inc/titan-framework-checker.php'; //Titan option if ( class_exists( 'TitanFramework' ) ){ require get_template_directory() . '/inc/titan-options.php'; } // Dynamic Styles which updates from customizer require get_template_directory() . '/inc/custom-css.php'; // plugin activator class require get_template_directory() . '/inc/plugin-activation.php'; // comment walker class require get_template_directory() . '/inc/rallypro-comment-walker.php';