Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template Name: portfolio Layout
- */
- get_header();
- ?>
- <div class="container">
- <div class="categories-list-dropdown filter--sidebar">
- <input type="hidden" id="filters-category" />
- <input type="hidden" id="filters-tag" />
- <?php $categories = get_categories(); ?>
- <ul class="cat-list">
- <li><a href="javascript:;" class="filter-link cat-list_item active" data-slug="">All projects</a></li>
- <?php foreach($categories as $category) : ?>
- <li>
- <a href="javascript:;" class="filter-link cat-list_item" data-slug="<?= $category->slug; ?>" data-type="category" data-id="<?= get_the_ID(); ?>">
- <?= $category->name; ?>
- </a>
- <span class="remove"><i class="fas fa-times"></i></span>
- </li>
- <?php endforeach; ?>
- </ul>
- <?php $tags = get_tags(); ?>
- <ul class="cat-list">
- <?php foreach($tags as $tag) : ?>
- <li>
- <a href="javascript:;" class="filter-link cat-list_item" data-slug="<?= $tag->slug; ?>" data-type="tag" data-id="<?= get_the_ID(); ?>">
- <?= $tag->name; ?>
- </a>
- <span class="remove"><i class="fas fa-times"></i></span>
- </li>
- <?php endforeach; ?>
- </ul>
- </div>
- <div class="projects-grid">
- <?php
- $projects = new WP_Query([
- 'post_type' => 'post',
- 'posts_per_page' => -1,
- 'order_by' => 'date',
- 'order' => 'desc',
- ]);
- ?>
- <div class="count" id="result-count"></div>
- <?php if($projects->have_posts()): ?>
- <ul class="project-tiles">
- <?php
- while($projects->have_posts()) : $projects->the_post();
- echo '<li>';
- the_title();
- echo '</li>';
- endwhile;
- ?>
- </ul>
- <?php wp_reset_postdata(); ?>
- <?php endif; ?>
- </div>
- </div>
- <?php
- get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement