Đoạn tóm tắt mặc định nó sẽ hiện trong feed kể cả khi bác cài hay không cài plugin Yoast Seo. Nếu không hiện liệu bài viết của bác có nội dung text hay không?
Còn về ảnh thumbnail trong feed, mình mở 2 trang kia bằng firefox và ko thấy hiện ảnh thu nhỏ trong feed?
Nếu bác vẫn muốn có ảnh thì thêm đoạn code sau vào file functions.php của theme:
PHP Code:
// display featured post thumbnails in WordPress feeds
function wcs_post_thumbnails_in_feeds( $content ) {
global $post;
if( has_post_thumbnail( $post->ID ) ) {
$content = '<p>' . get_the_post_thumbnail( $post->ID ) . '</p>' . $content;
}
return $content;
}
add_filter( 'the_excerpt_rss', 'wcs_post_thumbnails_in_feeds' );
add_filter( 'the_content_feed', 'wcs_post_thumbnails_in_feeds' );
Nguồn: http://wordpress.stackexchange.com/questions/159397/
Bookmarks