tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); function biddo_sow_max_title_length( $title ) { $max = 50; if( strlen( $title ) > $max ) { return substr( $title, 0, $max ). " …"; } else { return $title; } } add_filter( 'the_title', 'biddo_sow_max_title_length'); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'custom-header'); add_theme_support( 'post-thumbnails' ); add_image_size('biddo_slider_image', 1920, 900, true); add_image_size( 'biddo_portflio', 300, 9999 ); add_image_size('biddo_big-image', 770, 400, true); add_image_size('biddo_team-image', 270, 356, true); add_image_size('biddo_testimonial', 80, 80, true); add_image_size('biddo_post-image', 368, 200, true); add_image_size('biddo_recent-post', 80, 80, true); /// custom menu add function biddo_themes_menus(){ register_nav_menus( array( 'mainmenu' => esc_html__( 'Main Menu','biddo') ) ); } add_action('init', 'biddo_themes_menus'); /* * 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( 'biddo_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } endif; add_action( 'after_setup_theme', 'biddo_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 */ require trailingslashit( get_template_directory() ). '/inc/theme_screept.php'; if ( ! function_exists( 'biddo_length' ) ) : function biddo_length( $length ) { return 20; } add_filter( 'excerpt_length', 'biddo_length', 20 ); endif; /** * breadcrumb. */ require trailingslashit( get_template_directory() ). '/inc/breadcrumb.php'; /** * Custom template tags for this theme. */ require trailingslashit( get_template_directory() ). '/inc/color-options.php'; /** * Custom template tags for this theme. */ require trailingslashit( get_template_directory() ). '/inc/recent-post-widget.php'; require trailingslashit( get_template_directory() ). '/inc/theme_widgets.php'; /** * Implement the Custom Header feature. */ if ( file_exists( dirname( __FILE__ ) . '/inc/metabox.php' ) ) { require_once dirname( __FILE__ ) . '/inc/metabox.php'; } if ( file_exists( dirname( __FILE__ ) . '/inc/class-tgm-plugin-activation.php' ) ) { require_once dirname( __FILE__ ) . '/inc/class-tgm-plugin-activation.php'; } if ( file_exists( dirname( __FILE__ ) . '/inc/plugins-activation.php' ) ) { require_once dirname( __FILE__ ) . '/inc/plugins-activation.php'; } /** * Custom template tags for this theme. */ require trailingslashit( get_template_directory() ). '/inc/template-tags.php'; /** /** * Custom functions that act independently of the theme templates. */ require trailingslashit( get_template_directory()). '/inc/extras.php'; /** * Customizer additions. */ require trailingslashit( get_template_directory() ). '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require trailingslashit( get_template_directory() ). '/inc/jetpack.php'; /** * Build Options page * * @since 1.0.0 */ function biddo_optionsframework_options_page(){ global $biddo_options_machine; require dirname( __FILE__ ) . '/admin/front-end/options.php'; }