How to disable Category Archives

Viewing 2 posts - 1 through 2 (of 2 total)
#187837

Ronja Baumann
Participant

Hey everyone,

I am currently using the Free Version to upload files and place download buttons for those one within my page.
Now I realized WordPress or the plugin is automatically creating categroy archive pages, which are also crawled by google search, so my users are being leaded to those pages. I would like to completely disable those ones or if disabling is not possible at least not indexing those in search engines. Is this possible within the free version of the plugin or how can I achieve this?

Thanks in advance.

Best regards
Ronja

#187842

Tanvir
Moderator

Hi,

Please put this code in your active theme functions.php, it will disable your individual category archives

add_filter( "register_taxonomy_args", function($args, $taxonomy, $object_type){
    if($taxonomy === 'wpdmcategory'){
        $args['public'] = false;
    }
    return $args;
}, 10, 3 );

Thanks.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘How to disable Category Archives’ is closed to new replies.