Mary_Pieroszkiewicz

archive.php

Sep 26th, 2019
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.17 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <section class="jku-title-wrapper">
  4.     <div class="jku-container">
  5.         <div class="jku-column jku-col-12">
  6.             <div class="jku-col-content">
  7.                 <h1><?php echo single_cat_title( '', false ); ?></h1>
  8.                 <h5>
  9.                     <?php
  10.                     $pageNumber = $paged;
  11.                     if ( $pageNumber === 0 ) { $pageNumber = 1; }
  12.  
  13.                     echo 'Strona ' . $pageNumber;
  14.                     ?>
  15.                 </h5>
  16.             </div>
  17.         </div>
  18.     </div>
  19. </section>
  20.  
  21. <section class="jku-post-grid-wrapper jku-blog-posts-wrapper">
  22.     <div class="jku-label-wrapper">
  23.         <div><span><?php echo single_cat_title( '', false ); ?></span></div>
  24.     </div>
  25.     <div class="jku-container">
  26.         <div class="jku-column jku-col-12">
  27.             <div class="jku-col-content">
  28.  
  29.                 <?php if ( have_posts() ) : ?>
  30.                     <div class="jku-post-grid-items-wrapper">
  31.                         <?php
  32.                         // The post
  33.                         while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
  34.  
  35.                             <div class="jku-post-grid-item">
  36.                                 <?php if ( has_post_thumbnail() ) { ?>
  37.                                     <a class="jku-post-grid-image" href="<?php the_permalink(); ?>">
  38.                                     <?php the_post_thumbnail(); ?>
  39.  
  40.                                 <?php } else { ?>
  41.                                     <a class="jku-image-placeholder" href="<?php the_permalink(); ?>">
  42.  
  43.                                 <?php }
  44.                                 if ( has_term( 'wideo', 'kategorie-przepisow' ) ) {
  45.                                     echo '<img class="jku-video-post-icon" src="/wp-content/themes/jakub-kuron/svg/jkuron-icon-video0.svg" /></img>';
  46.                                 }
  47.                                 echo '</a>';
  48.                                 ?>
  49.  
  50.                                 <h5 class="jku-post-grid-categories">
  51.                                     <?php
  52.                                         $term_list = wp_get_post_terms($post->ID, 'kategorie-przepisow', array("fields" => "all"));
  53.                                         foreach($term_list as $term_single) {
  54.                                             echo '<span><a href="' . esc_url(get_term_link( $term_single )) . '">' . $term_single->name . '</a></span>';
  55.                                         }
  56.                                     ?>
  57.                                 </h5>
  58.                                 <a class="jku-post-grid-title" href="<?php the_permalink(); ?>"><h3><?php echo get_the_title(); ?></h3></a>
  59.                             </div>
  60.  
  61.                         <?php endwhile; ?>
  62.                     </div>
  63.                 <?php
  64.  
  65.                     // Previous/next page navigation.
  66.                     twentynineteen_the_posts_navigation();
  67.                 else :
  68.                     get_template_part( 'template-parts/content/content', 'none' );
  69.  
  70.                 endif;
  71.                 ?>
  72.  
  73.             </div>
  74.         </div>
  75.     </div>
  76. </section>
  77.  
  78. <?php get_footer();
Advertisement
Add Comment
Please, Sign In to add comment