I have a code that I want to display in lists.

    <ul class="simplefilter filter-port">
        <li class="btn active button btn-hover" data-filter="all">All</li>
        <li class="btn button btn-hover" data-filter="1">Brand</li>
        <li class="btn button btn-hover" data-filter="2">Design</li>
        <li class="btn button btn-hover" data-filter="3">Graphic</li>

The "All" word above displays parent category list, others displays child category lists. Here is code to display post by category filter above.

<div class="col-xs-12 col-sm-6 col-md-6 col-lg-4 filtr-item" data-category="1" style="padding: 0;">
    <div class="port-caption">
        <!-- PORTFOLIO IMAGE -->
        <a href="work.html"><img src="<?php echo get_bloginfo('template_directory'); ?>/img/portfolio/portfolio-01.jpg" alt="portfolio-01" /></a>

NOTE: the difference for other post is by data-category.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy