function generate_rss_feed() { // Get all post categories $categories = get_categories(); // Create a new SimplePie object for the RSS feed $feed = new SimplePie(); $feed->set_feed_url(home_url('/rss')); $feed->set_title(get_bloginfo('name')); $feed->set_link(home_url()); $feed->set_description(get_bloginfo('description')); // Loop through each category and add posts to the feed foreach ($categories as $category) { // Only include published posts in the last 30 days $posts = get_posts([ 'post_type' => ['post'], 'post_status' => 'publish', 'numberposts' => 1000, // Adjust as needed 'category' => $category->term_id, 'date_query' => [ [ 'column' => 'post_date', 'after' => '30 days ago' ] ] ]); // Add items to the feed foreach ($posts as $post) { $item = new SimplePieItem(); $item->set_title($post->post_title); $item->set_link(get_permalink($post)); $item->set_content(apply_filters('the_content', $post->post_content)); $item->set_date(get_the_date(DATE_RSS, $post)); $feed->add_item($item); } } // Output the RSS feed $feed->handle_content_type(); exit; }{"id":807360,"date":"2016-07-19T07:05:47","date_gmt":"2016-07-19T14:05:47","guid":{"rendered":"https:\/\/radiofacts.com\/?p=174570"},"modified":"2016-07-19T07:05:47","modified_gmt":"2016-07-19T14:05:47","slug":"kelly-price-singing-lay-gospel-segment-explanation","status":"publish","type":"post","link":"https:\/\/theindustry.biz\/kelly-price-singing-lay-gospel-segment-explanation\/","title":{"rendered":"Kelly Price Singing As We Lay for Gospel Segment Explanation"},"content":{"rendered":"
Radio Facts:<\/strong> Singer Kelly Price took the heat over the last few days for singing “As We Lay” at what many thought was a Gospel Convention<\/em>. It was not a Gospel convention but the Indiana Black Expo and the segment was a Gospel Segment<\/strong>. Originally Kelly was supposed to sing BEFORE the segment but her performance got pushed up closer to the actual Gospel segment which made people think she was singing the song as a part of the Gospel show. Kelly stated she was followed by the radio host of the show and told her performance was “Inappropriate.” \u00a0The Indiana Black Expo issued an apology. \u00a0Price denounced the church for their bigotry.\u00a0<\/p>\n <\/p>\n","protected":false},"excerpt":{"rendered":" Singer Kelly Price took the heat over the last few days for singing “As We Lay” at what many thought was a Gospel Convention<\/em>. It was not a Gospel convention but the Indiana Black Expo and the segment was a Gospel Segment<\/strong>. Originally Kelly was supposed to sing BEFORE the segment but her performance got pushed up closer to the actual Gospel segment which made people think she was singing the song as a part of the Gospel show. Kelly stated she was followed by the radio host of the show and told her performance was “Inappropriate.” \u00a0The Indiana Black Expo issued an apology. \u00a0Price denounced the church for their bigotry.\u00a0<\/p>\n \u00a0<\/p>\n","protected":false},"author":44,"featured_media":174571,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"tdm_status":"","tdm_grid_status":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[18844,37929],"tags":[3352,24441,16171,231],"class_list":{"0":"post-807360","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-radio-and-music-industry-news","8":"category-uncategorized","9":"tag-black-female-singers","10":"tag-black-singers-male","11":"tag-kelly-price","12":"tag-radio"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/theindustry.biz\/wp-json\/wp\/v2\/posts\/807360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theindustry.biz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theindustry.biz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theindustry.biz\/wp-json\/wp\/v2\/users\/44"}],"replies":[{"embeddable":true,"href":"https:\/\/theindustry.biz\/wp-json\/wp\/v2\/comments?post=807360"}],"version-history":[{"count":0,"href":"https:\/\/theindustry.biz\/wp-json\/wp\/v2\/posts\/807360\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theindustry.biz\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/theindustry.biz\/wp-json\/wp\/v2\/media?parent=807360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theindustry.biz\/wp-json\/wp\/v2\/categories?post=807360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theindustry.biz\/wp-json\/wp\/v2\/tags?post=807360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}