Change plugin’s has_archive = true to false?

The register_post_type_args filter (available from WordPress v4.4 on) will allow post type registration arguments to be changed:

function wpse206329_custom_post_type_args( $args, $post_type ) {
    if ( $post_type === "my_post_type" ) {
        $args['rewrite'] = false;
    }

    return $args;
}
add_filter( 'register_post_type_args', 'wpse206329_custom_post_type_args', 20, 2 );

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)