Home Forums Bee WordPress Theme Adding filters to Ajax portfolio Reply To: Adding filters to Ajax portfolio



I’ve copied the following


	 $portfolio_categories = get_the_category($portfolio->ID);
            $separator = ' ';
            $output = '';
                foreach($portfolio_categories as $category) {
                    $output .= 'filter_'.$category->slug.$separator;


                    <ul class="clearfix filters <?php echo $filter_class; ?>">
                        <li class="active"><a href="#" data-filter="*"><?php _e('All','ux'); ?></a></li>	
                        <?php foreach($get_categories as $cate): ?>		
                        <li><a data-filter=".filter_<?php echo $cate->slug; ?>" href="#"><?php echo $cate->name; ?></a></li>
                        <?php endforeach; ?> 
                    </ul><!--End filter-->

But i get the Warning: Invalid argument supplied for foreach() in /web/htdocs/www.danielfazio.com/home/wp-content/themes/bee-child/functions/functions-part4.php as value for $get_categories does not seem to be set. Do I need some extra parts of code? I will be very grateful for help.