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