Portfólio de filtragem no WordPress usando o isótopo jQuery

Quero filtrar o portfólio usando o isótopo. Posso mostrar os itens, mas não posso filtrar. Aqui está o meu código. Dê uma olhada e compartilhe seus pensamentos o que estou perdendo.

    1. <?php $terms = get_terms('portfolio-type'); $count = count($terms); echo '
    2. All
    3. '; if ( $count > 0 ){ foreach ( $terms as $term ) { $termname = strtolower($term->name); $termname = str_replace(' ', '-', $termname); echo '
    4. '.$term->name.'
    5. '; } } ?>
'portfolio', 'posts_per_page' => 8 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); ?>
<a href="https://wordpress.stackexchange.com//questions/249265/filterable-portfolio-in-wordpress-using-jquery-isotope/" title="Project description" rel="prettyPhoto" target="_blank">

<img class="img-responsive" alt="Project Image" src="https://wordpress.stackexchange.com//questions/249265/filterable-portfolio-in-wordpress-using-jquery-isotope/"/>
(function($){ var $container = $('.portfolio-item'); // create a clone that will be used for measuring container width $containerProxy = $container.clone().empty().css({ visibility: 'hidden' }); $container.after( $containerProxy ); // get the first item to use for measuring columnWidth var $item = $container.find('.hover-bg').eq(0); $container.imagesLoaded(function(){ $(window).smartresize( function() { // calculate columnWidth var colWidth = Math.floor( $containerProxy.width() / 2 ); // Change this number to your desired amount of columns // set width of container based on columnWidth $container.css({ width: colWidth * 2 // Change this number to your desired amount of columns }) .isotope({ // disable automatic resizing when window is resized resizable: false, // set columnWidth option for masonry masonry: { columnWidth: colWidth } }); // trigger smartresize for first time }).smartresize(); }); // filter items when filter link is clicked $('#cat a').click(function(){ var selector = $(this).attr('data-filter'); $container.isotope({ filter: selector, animationEngine : "css" }); $('#cat a.active').removeClass('active'); $(this).addClass('active'); return false; }); } ) ( jQuery );

Solutions Collecting From Web of "Portfólio de filtragem no WordPress usando o isótopo jQuery"