• <ul class=”portfolio-categ filter”>
    <?php
    $args = array(
    ‘show_option_all’ => ”,
    ‘orderby’ => ‘name’,
    ‘order’ => ‘ASC’,
    ‘style’ => ‘list’,
    ‘show_count’ => 0,
    ‘hide_empty’ => 1,
    ‘use_desc_for_title’ => 1,
    ‘child_of’ => 0,
    ‘feed’ => ”,
    ‘feed_type’ => ”,
    ‘feed_image’ => ”,
    ‘exclude’ => ”,
    ‘exclude_tree’ => ”,
    ‘include’ => ”,
    ‘hierarchical’ => 1,
    ‘title_li’ => __( ‘Categories’ ),
    ‘show_option_none’ => __( ” ),
    ‘number’ => null,
    ‘echo’ => 1,
    ‘depth’ => 0,
    ‘current_category’ => 0,
    ‘pad_counts’ => 0,
    ‘taxonomy’ => ‘category’,
    ‘walker’ => null
    );
    wp_list_categories( $args );
    ?>

    <div class=”clearfix”>
    </div>
    <div class=”row”>
    <section id=”projects”>
    <ul id=”thumbs” class=”portfolio”>

    <?php query_posts( $args );
    if (have_posts()) :
    while (have_posts()) : the_post();

    if ( has_post_thumbnail() ) :
    the_post_thumbnail();

    $category = get_the_category();
    ?>
    <!– Item Project and Filter Name –>
    <li class=”item-thumbs col-lg-3 design” data-id=”id-0″ data-type=”<?php echo $category; ?>”>
    <!– Fancybox – Gallery Enabled – Title – Full Image –>
    “>
    <span class=”overlay-img”></span>
    <span class=”overlay-img-thumb font-icon-plus”></span>

    <!– Thumb Image and Description –>
    <img src=”<?php bloginfo(‘url’); ?>/wp-content/uploads/category-images/<?php echo $category[0]->category_nicename ; ?>-150×150.jpg” alt=”<?php the_title(); ?>” />

    <!– End Item Project –>
    <?php endif; endwhile;
    endif;
    wp_reset_query(); ?>

Viewing 1 replies (of 1 total)
  • Thread Starter raju_odedarawp

    (@rajuo)

    i have a ‘post’ called portfolio and it has 10 items or posts which are only featured images.and portfolio has four categories like all,web,icon and graphic.each category has 2 to 4 items which are featured images.so i want all categories to show dynamically which is happening but when category is clicked i want to dispmay all featured images of particular category.please help me quickly.

    i want to display like this

    categories

    all icon web graphic <-when clicked on icon ->

    icon-1
    icon-2
    icon-3
    icon-4

Viewing 1 replies (of 1 total)
  • The topic ‘show categories dynamically and display categories post items on click of it’ is closed to new replies.