Passed
Push — master ( 574619...9702d1 )
by Amit
04:42
created

archive.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * The template for displaying archive pages.
4
 *
5
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
6
 *
7
 * @package podium
8
 */
9
10
use Podium\Config\Settings as settings;
11
12
$settings = new settings();
13
14
get_header();
15
?>
16
<div class="grid-container">
17
    <div id="content" class="site-content grid-x grid-padding-x">
18
        <div id="primary" class="content-area small-12 <?php echo $settings->getContentClass('medium-8', 'medium-12'); ?> cell">
19
            <main id="main" class="site-main" role="main">
20
21
                <?php
22
23
                if (have_posts()) {
24
25
                    ?>
26
27
                    <header class="page-header">
28
                        <?php
29
30
                        the_archive_title('<h1 class="page-title">', '</h1>');
31
                        the_archive_description('<div class="taxonomy-description">', '</div>');
32
                        ?>
33
                    </header><!-- .page-header -->
34
35
                    <?php /* Start the Loop */?>
36
                    <?php
37
38 View Code Duplication
                    while (have_posts()) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
39
                        the_post();
40
41
        /*
42
         * Include the Post-Format-specific template for the content.
43
         * If you want to override this in a child theme, then include a file
44
         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
45
         */
46
        if (get_post_type() != 'post') {
47
            get_template_part('template-parts/content', get_post_type());
48
        } else {
49
            get_template_part('template-parts/content-post', get_post_format());
50
        }
51
52
    }
53
54
// End while
55
56
    if (function_exists('emm_paginate')) {
57
58
        emm_paginate();
59
60
    }
61
62
} else {
63
64
    get_template_part('template-parts/content', 'none');
65
66
}
67
68
?>
69
70
</main><!-- #main -->
71
</div><!-- #primary -->
72
<?php
73
74
if ($settings->displaySidebar()) {
75
76
    get_template_part('template-parts/sidebar', 'page');
77
78
}
79
80
?>
81
</div><!-- #content -->
82
</div><!-- .grid-container -->
83
<?php get_footer(); ?>
84