How to remove year page from wordpress

Question

I have tried to add page with permalink 2020 but unfortunately it is taken by some build in wordpress year archive page. How can I reclaim such permalink? :
http://localhost/wp/2020enter image description here/

I have used following code to remove those pages:

// remove year archives
add_filter( 'date_rewrite_rules', function( $rules ){
    return array();
} );

but even after that when I try to add new page called 2020, wordpress creates permalink 2020-2, please help

0
toHo 2 years 2020-01-10T08:39:13-05:00 0 Answers 65 views 0

Leave an answer

Browse
Browse