Forums

Sorting thumbnails by category (3 posts)

  1. pixelfight
    Member
    Posted 5 years ago #

    hi, I did a fair amount of searching on my little problem. I am trying to display thumbnails by category.

    Please view my development site for what I am trying to accomplish.

    http://www.pixelfight.com/development/element/product-gallery/

    Does anyone know what tag or query I should use? Sorry, I am really new to WP and PHP.

  2. pixelfight
    Member
    Posted 5 years ago #

    Can anyone help? Please ;-) I simply want to sort my thumbnails dynamically by category. Also, I would like to list the title of the category above each group of thumbnails.

    This is my code so far
    <!-- put the stuff that make the thumbnails here -->
    <?php
    $posts = get_posts('numberposts=50&offset=1&category=1');
    foreach($posts as $post) :
    setup_postdata($post);

    ?>

    <!-- BEGIN post -->
    <div id="postg-<?php the_ID(); ?>" class="postg clearfix">

    <a>" title="">

    <!-- install for yapb thumbails -->
    <?php if (!is_null($image = YapbImage::getInstanceFromDb($post->ID))): ?>
    <div id="thumbs">

    <ul><p><img src="<?php echo $image->getThumbnailHref(array('w=150', 'h=66','zc=1','fltr[]=usm|40|0.5|3')) ?>" width="150" height="66" ></p></ul>
    </div>
    <?php endif ?>
    <!-- install for yapb thumbails -->

    </a>

    </div>
    <!-- END post -->
    <?php endforeach; ?>
    <!-- put the stuff that make the thumbnails here -->

  3. Chris_K
    Member
    Posted 5 years ago #

    Bumping after one hour is a good way to remove yourself from the "unanswered posts" queue that many volunteers start with.

    It may take more than 1 or 2 hours for someone who can help to stop by (all support is done by unpaid volunteers).

    Your patience is hoped for.

Topic Closed

This topic has been closed to new replies.

About this Topic