Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement