'category', 'hide_empty' => true, 'orderby' => 'name', 'order' => 'ASC', ]); $current_cat = isset($_GET['cat']) ? intval($_GET['cat']) : 0; echo ''; echo 'Wszystkie'; foreach ($categories as $cat) : $is_active = ($current_cat === $cat->term_id) ? ' class="active"' : ''; $link = add_query_arg('cat', $cat->term_id); ?> > name); ?>
'post', 'posts_per_page' => 9, 'orderby' => 'date', 'order' => 'DESC', ]; if ($current_cat) { $args['cat'] = $current_cat; } $query = new WP_Query($args); if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); get_template_part('inc/template-article-card', null, [ 'image' => get_the_post_thumbnail_url(get_the_ID(), 'medium_large'), 'title' => get_the_title(), 'link' => get_the_permalink(), 'category' => get_the_category() ]); endwhile; endif; wp_reset_postdata(); ?>
found_posts > 9) : ?>