indieweb-post-kinds
indieweb-post-kinds copied to clipboard
Customize RSS Feed with Post Kinds Meta Data
Hello,
I would like to customize my rss-feeds for Post Kind entries. E.g. the title shoul not be blank in the Feed or the Post Kinds Field "Featured Image" should be used as Image. With the following code i managed to add the post kind name to the title in the rss feed, but i am not able to access values like "featured image" or "name" which i enter in the "Details" for the Post.
function add_kind_to_rss_post_title(){ global $cite; $kinds = wp_get_post_terms( get_the_ID(), 'kind' ); print_r($cite); if( ! isset( $kinds ) || empty( $kinds ) ) return get_the_title(); $kind = $kinds[0]->name; $title = get_the_title(); return trim( "[{$kind}] {$title}" ); } add_filter( 'the_title_rss', 'add_kind_to_rss_post_title', 4 );