Skip to content

Instantly share code, notes, and snippets.

@annelyse
Created July 7, 2021 11:58
Show Gist options
  • Save annelyse/9658de19c6f5e26319d8051e35e3629b to your computer and use it in GitHub Desktop.
Save annelyse/9658de19c6f5e26319d8051e35e3629b to your computer and use it in GitHub Desktop.
<?php
// Flux RSS
add_filter( 'request', 'gkp_add_cpts_to_rss_feed' );
function gkp_add_cpts_to_rss_feed( $args ) {
if ( isset( $args['feed'] ) && !isset( $args['post_type'] ) )
$args['post_type'] = array('post', 'actualites');
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment