Disable RSS Feeds

/** * Display a custom message instead of the RSS Feeds. * * @return void */ function wpcode_snippet_disable_feed() { wp_die( sprintf( // Translators: Placeholders for the homepage link. esc_html__( ‘No feed available, please visit our %1$shomepage%2$s!’ ), ‘ ‘, ‘‘…Continue reading

Add Featured Images to RSS Feeds

/** * Add the post thumbnail, if available, before the content in feeds. * * @param string $content The post content. * * @return string */ function wpcode_snippet_rss_post_thumbnail( $content ) { global $post; if ( has_post_thumbnail( $post->ID ) ) {…Continue reading

MemberPress: MailChimp Feed Unblocker

function mepr_allow_mc_through( $block, $post, $uri ) { if( isset( $_GET[ ‘allow_mailchimp’ ] ) ) { $block = false; } return $block; } add_filter( ‘mepr-pre-run-rule-content’, ‘mepr_allow_mc_through’, 11, 3 );Continue reading

Add Featured Images to RSS Feeds

/** * Add the post thumbnail, if available, before the content in feeds. * * @param string $content The post content. * * @return string */ function wpcode_snippet_rss_post_thumbnail( $content ) { global $post; if ( has_post_thumbnail( $post->ID ) ) {…Continue reading

Disable RSS Feeds

/** * Display a custom message instead of the RSS Feeds. * * @return void */ function wpcode_snippet_disable_feed() { wp_die( sprintf( // Translators: Placeholders for the homepage link. esc_html__( ‘No feed available, please visit our %1$shomepage%2$s!’ ), ‘ ‘, ‘‘…Continue reading

Delay Posts in RSS Feeds

function wpcode_snippet_publish_later_on_feed( $where ) { global $wpdb; if ( is_feed() ) { // Timestamp in WP-format. $now = gmdate( ‘Y-m-d H:i:s’ ); // Number of unit to wait $wait = ’10’; // integer. // Choose time unit. $unit = ‘MINUTE’;…Continue reading

Add Featured Images to RSS Feeds

/** * Add the post thumbnail, if available, before the content in feeds. * * @param string $content The post content. * * @return string */ function wpcode_snippet_rss_post_thumbnail( $content ) { global $post; if ( has_post_thumbnail( $post->ID ) ) {…Continue reading

Exclude Specific Categories from RSS Feed

/** * Exclude a category or multiple categories from the feeds. * If you want to exclude multiple categories, use a comma-separated list: “-15, -5, -6”. * Make sure to prefix the category id(s) with a minus “-“. * *…Continue reading