for posts and comments. add_theme_support( 'automatic-feed-links' ); // Featured image add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 672, 372, true ); add_image_size( 'advent-full-width', 1038, 576, true ); register_nav_menus( array( 'primary' => __( 'Top primary menu', 'advent' ), ) ); // Switch default core markup for search form, comment form, and commen, to output valid HTML5. add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', ) ); add_theme_support( 'custom-background', apply_filters( 'advent_custom_background_args', array( 'default-color' => 'f5f5f5', ) ) ); // Add support for featured content. add_theme_support( 'featured-content', array( 'featured_content_filter' => 'advent_get_featured_posts', 'max_posts' => 6, ) ); // This theme uses its own gallery styles. add_filter('use_default_gallery_style', '__return_false' ); /* slug setup */ add_theme_support( 'title-tag' ); /* height width automaticly adjust for home slider */ add_image_size( 'advent-home-thumbnail-image', 250, 180, true ); } endif; // advent_setup add_action( 'after_setup_theme', 'advent_setup' ); /** * Register OpenSans Google font for advent. */ function advent_font_url() { $advent_font_url = ''; /* * Translators: If there are characters in your language that are not supported * by OpenSans, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'OpenSans font: on or off', 'advent' ) ) { $advent_font_url = add_query_arg( 'family', urlencode( 'OpenSans:300,400,700,900,300italic,400italic,700italic' ), "//fonts.googleapis.com/css?family=Open+Sans" ); } return $advent_font_url; } /* top header background image on wp_head hook */ add_action('wp_head','advent_header_bg'); function advent_header_bg() { $advent_options = get_option('advent_theme_options'); if (!empty($advent_options['headertop-bg'])) { $advent_header_bg_img=""; echo $advent_header_bg_img; } } /* Set size of characher in excerpt */ function advent_excerpt_length( $length ) { return 63; } add_filter( 'excerpt_length', 'advent_excerpt_length', 999 ); /* readmore button if more content */ function advent_excerpt_more() { return '...

'.__('Read more','advent').'
'; } add_filter("excerpt_more", "advent_excerpt_more"); /* * Comments placeholder function * **/ add_filter( 'comment_form_default_fields', 'advent_comment_placeholders' ); function advent_comment_placeholders( $fields ) { $fields['author'] = str_replace( '