'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') )); //html5 add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' )); } add_action('after_setup_theme', 'beautystyle_setup' ); /* Custom logo setup /* ------------------------------------ */ function beautystyle_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 ); } add_action( 'after_setup_theme', 'beautystyle_custom_logo_setup' ); /* --------------------------------------- */ /*@audit General */ /* ---------------------------------------- */ /* custom read more to excerpt - modify [..] to button /* ------------------------------------ */ function wpdocs_excerpt_more() { return sprintf('%2$s', get_permalink( get_the_ID() ), __('
', 'beautystyle') ); } add_filter('excerpt_more', 'wpdocs_excerpt_more'); /** * Set up the content width value based on the theme's design. * */ if ( ! isset( $content_width ) ) $content_width = 968; add_action( 'admin_footer', function() { ?> is_home() || $query->is_archive() ) { set_query_var('posts_per_page', -1); } } add_action( 'pre_get_posts', 'custom_posts_per_page' ); /* --------------------------------------- */ /*@audit 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' ); /* --------------------------------------- */ /*@audit 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' => '