Skip to main content
added 2 characters in body
Source Link
Pieter Goosen
  • 55.4k
  • 23
  • 115
  • 209

You can user another small script, without adding any plugin. There is a post here: http://www.barattalo.it/2015/09/08/wordpress-remove-archive-pages/here and the code to add in the index.php of your theme is this:

if(is_archive()) {
    // force 404
    $wp_query->set_404();
    status_header( 404 );
    nocache_headers();
    include("404.php");
    die;
}

Hope you find it useful.

You can user another small script, without adding any plugin. There is a post here: http://www.barattalo.it/2015/09/08/wordpress-remove-archive-pages/ and the code to add in the index.php of your theme is this:

if(is_archive()) {
    // force 404
    $wp_query->set_404();
    status_header( 404 );
    nocache_headers();
    include("404.php");
    die;
}

Hope you find it useful.

You can user another small script, without adding any plugin. There is a post here and the code to add in the index.php of your theme is this:

if(is_archive()) {
    // force 404
    $wp_query->set_404();
    status_header( 404 );
    nocache_headers();
    include("404.php");
    die;
}

Hope you find it useful.

Source Link
Pons
  • 121
  • 3

You can user another small script, without adding any plugin. There is a post here: http://www.barattalo.it/2015/09/08/wordpress-remove-archive-pages/ and the code to add in the index.php of your theme is this:

if(is_archive()) {
    // force 404
    $wp_query->set_404();
    status_header( 404 );
    nocache_headers();
    include("404.php");
    die;
}

Hope you find it useful.