Blog post category filtering using Isotope (4 posts)

  1. leema01
    Posted 4 years 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
    Posted 4 years 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
  3. reide
    Posted 4 years ago #

  4. Adam Pickering
    Posted 3 years ago #

    Checkout this Isotope for WordPress plugin: http://mintthemes.com/isotopes-for-wordpress/

    Simply download it, install it in your WordPress site, and then place the template tag just above “The Loop” on any WordPress archive-based theme page. Most likely you’ll be looking for archive.php, tag.php, or category.php.

    Theres support for the Easy Digital Downloads and WooCommerce plugins so that you can use this to filter products if you’re using either of those shopping cart plugins on your website.

Topic Closed

This topic has been closed to new replies.

About this Topic