tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); $args = array( 'width' => 1600, 'flex-width' => true, 'uploads' => true, 'random-default' => true, 'header-text' => false, 'default-text-color' => '#000000', 'default-image' => business_trust_TEMPLATE_DIR_URI.'/images/header.jpg', ); add_theme_support( 'custom-header', $args ); /* * 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' ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'business-trust' ), ) ); register_nav_menus( array( 'secondary' => esc_html__( 'Secondary', 'business-trust' ), ) ); /* * 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( 'business_trust_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } endif; add_action( 'after_setup_theme', 'business_trust_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 business_trust_content_width() { $GLOBALS['content_width'] = apply_filters( 'business_trust_content_width', 640 ); } add_action( 'after_setup_theme', 'business_trust_content_width', 0 ); /** * Add custom logo * * @link https://codex.wordpress.org/Theme_Logo */ function business_trust_theme_prefix_setup() { add_theme_support( 'custom-logo', array( 'height' => 100, 'width' => 400, 'flex-width' => true, ) ); } add_action( 'after_setup_theme', 'business_trust_theme_prefix_setup' ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function business_trust_widgets_init() { register_sidebar( array( 'name' => __( 'Blog Sidebar', 'business-trust' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'business-trust' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 1', 'business-trust' ), 'id' => 'footer-sidebar-1', 'description' => __( 'Add widgets here to appear in your footer.', 'business-trust' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 2', 'business-trust' ), 'id' => 'footer-sidebar-2', 'description' => __( 'Add widgets here to appear in your footer.', 'business-trust' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 3', 'business-trust' ), 'id' => 'footer-sidebar-3', 'description' => __( 'Add widgets here to appear in your footer.', 'business-trust' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 4', 'business-trust' ), 'id' => 'footer-sidebar-4', 'description' => __( 'Add widgets here to appear in your footer.', 'business-trust' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'business_trust_widgets_init' ); /** * Register custom fonts. */ if(!function_exists('business_trust_fonts_url')) { function business_trust_fonts_url() { $fonts_url = ''; $typography = _x( 'on', 'Open Sans font: on or off', 'business-trust' ); if ( 'off' !== $typography ) { $font_families = array(); $font_families[] = 'Montserrat'.':300,400,500'; //header $font_families[] = 'Lato'.':300,400,500'; //body $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( $fonts_url ); } } /** * Display custom font CSS. */ function business_trust_fonts_css_container() { require( get_parent_theme_file_path( '/inc/google-fonts.php' ) ); ?> '; $wrap .= ''; $wrap .= '%3$s'; $wrap .= ''; return $wrap; } function business_trust_excerpt($more) { global $post; return '...'.esc_html__('Read More','business-trust').''; } add_filter('excerpt_more','business_trust_excerpt');