Your cart is currently empty!
How to include custom posts in post RSS in WordPress
Put the following code in functions.php. For example, if it is a slug for a custom post type called ‘product’ or ‘wpdmpro’, enter it as follows. Replace slug with your own custom post type slug.
/* Include custom posts in post RSS */
add_filter( 'pre_get_posts', 'my_custom_posts_rss' );
function my_custom_posts_rss( $query ) {
if ( is_feed() )
$query->set( 'post_type', array( 'post', 'product', 'wpdmpro' ) );
return $query;
}
Leave a Reply