WordPress.org

Ready to get started?Download WordPress

Forums

Taxonomy Images
Limit items to display & random item list (2 posts)

  1. yikamz
    Member
    Posted 2 years ago #

    im not sure if this one has already a post.

    i want my site to display only about ten (10) taxonomy items in index page. and if possible, display RANDOM items. here's my code

    <?php
    $removetitle = array('title' => null);
    $terms = apply_filters( 'taxonomy-images-get-terms', '', array(
    	'taxonomy' => 'post_tag'
    	)
    );
    	if ( ! empty( $terms ) ) {
    		print "\n" . '<ul id="client-avatar">';
    			foreach( (array) $terms as $term ) {
    			print "\n" . '<li>';
    			print "\n\t" . '<a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '" title="' . esc_html( $term->name ) . '" class="">' . wp_get_attachment_image( $term->image_id, 'full', 0, $removetitle ) . '</a>';
    			print "\n" . '</li>';
    			}
    		print "\n" . '</ul>';
    	}
    ?>

    can anyone help? :D

    http://wordpress.org/extend/plugins/taxonomy-images/

  2. spexer
    Member
    Posted 1 year ago #

    Hey! I am looking for the same thing. Did you ever find a way to do this?

    Regards Fredrik

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.