change RSS feed URL

I NEED to change the default rss url of my website:

from example.com/feed to example.com/MyfeedName

i managed to create another Url feed but i need to remove example.com/feed:

add_action( 'init', function()
{
add_feed( 'secretfeed', 'do_feed_rss2' );
});

add_action( 'pre_get_posts', function( WP_Query $q )
{
if( $q->is_feed( 'secretfeed' ) )
    add_filter( 'option_rss_use_excerpt', '__return_false' );

 } );

Read more here: change RSS feed URL

Leave a Reply

Your email address will not be published. Required fields are marked *