Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template Name: Przepisy
- * The template for displaying archive pages
- *
- * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
- *
- * @package WordPress
- * @subpackage Twenty_Nineteen
- * @since 1.0.0
- */
- get_header();
- ?>
- <section class="jku-title-wrapper">
- <div class="jku-container">
- <div class="jku-column jku-col-12">
- <div class="jku-col-content">
- <h1>Przepisy kulinarne</h1>
- </div>
- </div>
- </div>
- </section>
- <section class="jku-post-grid-wrapper">
- <div class="jku-label-wrapper">
- <div><span>Przepisy kulinarne</span></div>
- </div>
- <div class="jku-container">
- <div class="jku-column jku-col-3">
- <div class="jku-col-content">
- <h2>Kategorie</h2>
- <?php echo do_shortcode( '[cpt-categories-cloud]' ); ?>
- </div>
- </div>
- <div class="jku-column jku-col-9">
- <div class="jku-col-content">
- <?php
- $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
- $wp_query = new WP_Query( array( 'post_type' => 'przepisy', 'ignore_sticky_posts' => 1, 'posts_per_page' => 12, 'paged' => $paged ) );
- if ( $wp_query->have_posts() ) : ?>
- <div class="jku-post-grid-items-wrapper">
- <?php
- // The post
- while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
- <div class="jku-post-grid-item">
- <?php if ( has_post_thumbnail() ) { ?>
- <a class="jku-post-grid-image" href="<?php the_permalink(); ?>">
- <?php the_post_thumbnail(); ?>
- <?php } else { ?>
- <a class="jku-image-placeholder" href="<?php the_permalink(); ?>">
- <?php }
- if ( has_term( 'wideo', 'kategorie-przepisow' ) ) {
- echo '<img class="jku-video-post-icon" src="/wp-content/themes/jakub-kuron/svg/jkuron-icon-video0.svg" /></img>';
- }
- echo '</a>';
- ?>
- <h5 class="jku-post-grid-categories">
- <?php
- $term_list = wp_get_post_terms($post->ID, 'kategorie-przepisow', array("fields" => "all"));
- foreach($term_list as $term_single) {
- echo '<span><a href="' . esc_url(get_term_link( $term_single )) . '">' . $term_single->name . '</a></span>';
- }
- ?>
- </h5>
- <a class="jku-post-grid-title" href="<?php the_permalink(); ?>"><h3><?php echo get_the_title(); ?></h3></a>
- </div>
- <?php endwhile;
- ?>
- </div>
- <?php
- twentynineteen_the_posts_navigation();
- endif;
- wp_reset_postdata();
- ?>
- </div>
- </div>
- </div>
- </section>
- <?php get_footer();
Advertisement
Add Comment
Please, Sign In to add comment