Improve main RSS

This commit is contained in:
Tetrakern 2023-08-09 13:02:58 +02:00
parent 5af8c04b31
commit 72c5c79021

View File

@ -13,6 +13,7 @@ $posts = new WP_Query(
array ( array (
'post_type' => ['post', 'fcn_story', 'fcn_chapter', 'fcn_recommendation'], 'post_type' => ['post', 'fcn_story', 'fcn_chapter', 'fcn_recommendation'],
'post_status' => 'publish', 'post_status' => 'publish',
'ignore_sticky_posts' => 1,
'orderby' => 'date', 'orderby' => 'date',
'order' => 'DESC', 'order' => 'DESC',
'posts_per_page' => get_option( 'posts_per_rss' ), 'posts_per_page' => get_option( 'posts_per_rss' ),
@ -45,6 +46,11 @@ $posts = new WP_Query(
) )
); );
// Prime author cache
if ( function_exists( 'update_post_author_caches' ) ) {
update_post_author_caches( $posts->posts );
}
// Feed title // Feed title
$title = sprintf( __( '%s Feed', 'fictioneer' ), get_bloginfo_rss( 'name' ) ); $title = sprintf( __( '%s Feed', 'fictioneer' ), get_bloginfo_rss( 'name' ) );