Remove Archive Title but Keep Category Description or Author Info

[ad_1]

I’m using this snippet to remove the author and category archives page title:

add_action( 'wp', function() {
    if ( is_author() || is_category() ) {
        remove_action( 'generate_archive_title', 'generate_archive_title' );
    }
} );

But it also remove the description or info, how can I remove the archive title but keep the description?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer