Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter SAFEER N

    (@safeerpangode)

    function display_sub_categories() {
    	$cat_id = get_query_var('cat');
    	$catlist = get_categories('hide_empty=0&child_of=' . $cat_id);
    	echo "<ul>";
    	foreach($catlist as $categories_item)
    	{
    		echo '<li>';
    		echo '<h3><a href="' . get_category_link( $categories_item->term_id ) . '" title="' . sprintf( __( "%s" ), $categories_item->name ) . '" ' . '>' . $categories_item->name.'</a> </h3> ';
    	    $terms = apply_filters( 'taxonomy-images-get-terms', '' );
    	    if ( ! empty( $terms ) ) {
    	      foreach( (array) $terms as $term ) {
    		        if($term->term_id == $categories_item->term_id) {
    		           print '<a class="thumb" href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'full' );
    		           echo '</a>';
    		       	 }
    	    	}
        		echo '<p>'. $categories_item->description; echo '</p></li>';
    		}
    	}
    	echo '</ul>';
    }

    problem solved with this.

Viewing 1 replies (of 1 total)