Category page returns 404 error

I believe there is no such “All Categories” archive page natively (because it would be just like the blog page – since every post have a category) . I recommend you to create a page template copying that code and modifying the query to include all posts and then creating a page with the slug ‘category’.

<?php
/*
* Template Name: Category
*/
?>

<?php define( 'WP_USE_THEMES', false ); get_header(); ?>


<div class="archive-meta">All categories of our blog!</div>


<?php query_posts('post_type=post'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

 <div class="row">
    <div class="article">

        <div class="small-12">
            <h4><a href="https://wordpress.stackexchange.com/questions/225407/<?php the_permalink() ?>"> <?php the_title(); ?></a></h4>
        </div>

        <div class="small-12 columns">
            <?php the_post_thumbnail() ?>
        </div>
        <div class="small-12 columns">
            <?php the_excerpt(); ?>
        </div>
    </div>
</div>                         


<?php endwhile; else : ?>
    <?php wp_list_categories(); ?>
<?php endif; ?>

<div class="small-12 columns">
    <?php custom_pagination() ?>
</div>


<?php get_footer(); ?>