← Back
Editing: archive.php
<?php /** * The template for displaying archive pages * * @link https://codex.wordpress.org/Template_Hierarchy * * @package WP_Bootstrap_Starter */ get_header(); ?> <?php if ( have_posts() ) : ?> <?php if (is_category([38, 40])) {?> <div class="navbar"> <div class="nav"> <h1><?= get_cat_name($GLOBALS['TIL'] == 'ru' ? 38: 40)?></h1> </div> </div> <?php } else { ?> <div class="navbar"> <div class="nav"> <h1><?=get_the_category()[0]->name ?></h1> </div> </div> <?php } ?> <div class="container"> <div class="row justify-content-center"> <?php $category = get_queried_object(); if ($category->term_id == 38 || $category->term_id == 40) {// news default, cat parent id include 'asda-templates/asda-product-part-to-archive.php'; } /* Start the Loop */ while ( have_posts() ) : the_post(); /* * Include the Post-Format-specific template for the content. * If you want to override this in a child theme, then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'template-parts/content', get_post_format() ); endwhile; the_custom_pagination(); ?> </div></div> <?php else : get_template_part( 'template-parts/content', 'none' ); endif; ?> <?php get_footer();
Save File
Cancel