WordPress.org

Ready to get started?Download WordPress

Forums

wp image taxonomy with limit posts (1 post)

  1. raghoo4
    Member
    Posted 1 year ago #

    hi some one help i am not a coder i just copy from all codes i want to execute image and name of the category and 5 posts from every category i am using this code but no luck

    <?php
    			global $wp_query;
    
    			$cats = get_categories('number=10');
    foreach ( $cats as $c ) {
        $url = get_category_link( $c->term_id );
        $img = $taxonomy_images_plugin->get_image_html( 'medium', $c->term_taxonomy_id );
    	 if( !empty( $img ) )
    
    	   print '<div class="aheadline"></div>';
    	   print '<a href="' . $url . '">' . $img . '</a>';
    	   print '<div style="float:right;"><a href="'. get_category_link($c).'" title="'. strip_tags($catdesc) .'">'. $c->cat_name . '</a></div><a href="' . get_category_link($c) . '" title="'. strip_tags($cdesc) .'"></a>';
    	   print '<a href="';
    	   print ''. the_permalink() .'';
    	   print '">';
    	   print ''. the_title() .'';
    	   print '</a>';
    	   print '<br>';
    
    }
    
    ?>

    and also want pagination to this code
    hear this code look a like

Topic Closed

This topic has been closed to new replies.

About this Topic