Passed
Push — master ( 1a67fb...1da117 )
by Amit
03:32
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 id="content" class="site-content row">
17
    <div id="primary" class="content-area small-12 <?php echo $settings->getContentClass('medium-8', 'medium-12'); ?> columns">
18
        <main id="main" class="site-main" role="main">
19
20
            <?php
21
22
            if (have_posts()) {
23
24
                ?>
25
26
                <header class="page-header">
27
                    <?php
28
29
                    the_archive_title('<h1 class="page-title">', '</h1>');
30
                    the_archive_description('<div class="taxonomy-description">', '</div>');
31
                    ?>
32
                </header><!-- .page-header -->
33
34
                <?php /* Start the Loop */?>
35
                <?php
36
37 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...
38
                    the_post();
39
40
        /*
41
         * Include the Post-Format-specific template for the content.
42
         * If you want to override this in a child theme, then include a file
43
         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
44
         */
45
        if (get_post_type() != 'post') {
46
            get_template_part('template-parts/content', get_post_type());
47
        } else {
48
            get_template_part('template-parts/content-post', get_post_format());
49
        }
50
51
    }
52
53
// End while
54
55
    if (function_exists('emm_paginate')) {
56
57
        emm_paginate();
58
59
    }
60
61
} else {
62
63
    get_template_part('template-parts/content', 'none');
64
65
}
66
67
?>
68
69
</main><!-- #main -->
70
</div><!-- #primary -->
71
<?php
72
73
if ($settings->displaySidebar()) {
74
75
    get_template_part('template-parts/sidebar', 'page');
76
77
}
78
79
?>
80
</div><!-- #content -->
81
<?php get_footer();?>
82