ID)) as $category) { $classes [] = 'wpcat-' . $category->cat_ID . '-id'; } return $classes; } add_filter('post_class', 'blog2019_category_id_class'); // Change excerpt length function blog2019_excerpt_length($length) { if ( is_admin() ) { return $length; } $read_more_length = 20; if ( blog2019_get_option('read_more_length') ) { $read_more_length = blog2019_get_option('read_more_length'); } return $read_more_length; } add_filter('excerpt_length', 'blog2019_excerpt_length'); // Change excerpt more word function blog2019_excerpt_more($more) { if ( is_admin() ) { return $more; } return '...'; } add_filter('excerpt_more', 'blog2019_excerpt_more'); // Adds custom classes to the array of body classes. function blog2019_body_classes( $classes ) { // Adds a class of group-blog to blogs with more than 1 published author. if ( is_multi_author() ) { $classes[] = 'blog2019-group-blog'; } if ( is_page_template( array( 'template-full-width-page.php', 'template-full-width-post.php' ) ) ) { $classes[] = 'blog2019-layout-full-width'; } if ( is_404() ) { $classes[] = 'blog2019-layout-full-width'; } $classes[] = 'blog2019-header-full-width'; return $classes; } add_filter( 'body_class', 'blog2019_body_classes' ); function blog2019_post_style() { $post_style = 'style-5'; if ( blog2019_get_option('post_style') ) { $post_style = blog2019_get_option('post_style'); } return $post_style; }