'C0C8E5', 'default-image' => '', 'default-repeat' => 'no-repeat', 'default-position-x' => 'left', 'default-position-y' => 'top', 'default-size' => 'auto', 'default-attachment' => 'scroll', ); add_theme_support( 'custom-background' , $defaults ); /* responsive embeds css classes */ add_theme_support( 'responsive-embeds' ); /* enable title in header */ add_theme_support("title-tag"); /* enable feature image */ add_theme_support('post-thumbnails'); /* Thumbnail sizes */ add_image_size('beautystyle_thumbox', 270 , 170 , true); /* automatic feed links */ add_theme_support('automatic-feed-links'); /* custom menu areas */ register_nav_menus( array( 'header' => esc_html__('Header', 'beautystyle') )); // Enable featured image add_theme_support( 'align-wide'); // add default Gutenberg block styles add_theme_support( 'wp-block-styles' ); // Add support for editor styles. add_theme_support( 'editor-styles' ); /* html5 */ add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption', 'style', 'script' )); /* Custom logo setup */ $defaults = array( 'height' => 200, 'width' => 300, 'flex-height' => true, 'flex-width' => true, 'header-text' => array( 'site-title', 'site-description' ), 'unlink-homepage-logo' => false, ); add_theme_support( 'custom-logo', $defaults ); /* block style */ if ( function_exists( 'register_block_style' ) ) { register_block_style( 'core/quote', array( 'name' => 'blue-quote', 'label' => __( 'Blue Quote', 'beautystyle' ), 'is_default' => true, 'inline_style' => '.wp-block-quote.is-style-blue-quote { color: blue; }', ) ); } /* block pattern */ require_once( get_template_directory() . '/functions/patterns.php' ); } } add_action( 'after_setup_theme', 'beautystyle_setup' ); /* custom read more to excerpt - modify [..] to button ---------------------------------------------------- */ function beautystyle_excerpt_more() { return sprintf('%2$s', esc_url( get_permalink( get_the_ID() ) ), __('
', 'beautystyle') ); } add_filter('excerpt_more', 'beautystyle_excerpt_more'); /* Set up the content width value based on the theme's design. ------------------------------------------------------------*/ if ( ! isset( $content_width ) ) { $content_width = 968; } /* home, archive and blog-post template pagination ----------------------------------------------- */ function custom_posts_per_page( $query ) { if ( $query->is_home() || $query->is_archive() ) { set_query_var('posts_per_page', -1); } } add_action( 'pre_get_posts', 'custom_posts_per_page' ); /* custom filed comment -------------------- */ function wpdocs_remove_website_field( $fields ) { unset( $fields['url'] ); unset( $fields['cookies'] ); return $fields; } add_filter( 'comment_form_default_fields', 'wpdocs_remove_website_field' ); /* Register widget area -------------------- */ function beautystyle_widget_init(){ register_sidebar( array( 'name' => __( 'Footer Widget', 'beautystyle' ), 'description' => __( 'Appears on footer of the page', 'beautystyle' ), 'id' => 'footer-wid', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '