Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="mix-item-menu text-center">
- <?php
- $all_cats = get_terms('portfolio_cat');
- if ( !empty($all_cats) && ! is_wp_error($all_cats) ) {
- $cats = $all_cats;
- }
- foreach ($cats as $cat) :
- ?>
- <button data-filter=".<?php echo $cat->slug; ?>" class=""><?php echo $cat->name; ?></button>
- <?php endforeach; ?>
- </div>
- ----------------------------------
- <?php
- $project_cats = get_the_terms( get_the_ID(), 'portfolio_cat' );
- if ( $project_cats && ! is_wp_error( $project_cats ) ) {
- $project_cat_list = array();
- foreach ( $project_cats as $cat ) {
- $project_cat_list[] = $cat->name;
- }
- $project_all_cats = join( " ", $project_cat_list);
- }
- else {
- $project_all_cats = '';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement