Forums

Blog post category filtering using Isotope (3 posts)

  1. leema01
    Member
    Posted 4 months ago #

    Hey,i just resently got my isotope masonary layout working and was wondering if anyone had figured a way to filter posts by categories?

    I foudn this http://www.merlinmason.co.uk/isotope-js-filtering-with-wordpress-categories/
    but it was unsuccessful for me.I aint a pro at java.

    If anyone would give any suggestions or links that would be great.

    [Signature removed by moderator per forum rules.]

  2. pixeldesigner
    Member
    Posted 4 months ago #

    I'm trying to figure this out as well for a portfolio theme i'm building.
    I found out how to add the category name to the "item" divs(below) but I've yet to find out how to add "data-filter" into the links displayed by wp_list_categories output.

    function plain_category(){
    		$cat_plaintext = strip_tags( get_the_term_list($post->ID, 'TAXONOMY_NAME', '', ', ', '' ) );
    		$cat_plaintext = strtolower($cat_plaintext);
    		$cat_plaintext = str_replace(' ','-',$cat_plaintext);
    		echo $cat_plaintext;
    
    	}

    and then just add

    <div class="isotope-item <?php plain_category(); ?>">
    content in here
    </div>
  3. reide
    Member
    Posted 2 months ago #

Reply

You must log in to post.

About this Topic