Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <section class="container-xxxl mb-4">
- <!-- Filters -->
- <?php $categories = get_categories(); ?>
- <ul class="nav text-center project-sections">
- <li class="nav-item">
- <a class="nav-link cat-list_item active" href="#" data-slug="">
- <i class="fa-solid fa-folder fa-2x"></i>
- <p><?php pll_e('Все проекты'); ?></p>
- </a>
- </li>
- <?php
- foreach( $categories as $category ) { ?>
- <li class="nav-item">
- <a class="nav-link cat-list_item" href="#" data-slug="<?php echo ($category -> slug); ?>">
- <i class="fa-solid fa-folder fa-2x"></i>
- <p><?php echo ($category -> name); ?></p>
- </a>
- </li>
- <?php } ?>
- </ul>
- <!-- Filters -->
- <!-- Project cards -->
- <div class="container-xxxl">
- <div class="row row-cols-1 row-cols-sm-2 row-cols-lg-3 g-3 post-filter">
- <?php
- $projects = new WP_Query([
- 'posts_per_page' => 1,
- 'post_type' => 'post',
- 'orderby' => 'data',
- 'order' => 'DESC',
- 'paged' => 1,
- ]);
- ?>
- <?php if ($projects->have_posts()) {
- while ($projects->have_posts()) {
- $projects->the_post();
- get_template_part('construction_parts/project-card');
- }
- wp_reset_postdata(); // reset
- }
- ?>
- </div>
- </div>
- <!-- Project cards -->
- <div class="btn__wrapper">
- <a href="#!" class="btn btn__primary" data-slug="<?php echo ($category -> slug); ?>" id="load-more">Load more</a>
- </div>
- </section>
Advertisement
Add Comment
Please, Sign In to add comment