WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] make recent posts pull multiple categories, not just 1

[Resolved] make recent posts pull multiple categories, not just 1

  • on the home page of my site, i have a slideshow of recent work.

    http://ankatankdesign.com/makes/

    i was able to find some code to help me do this, but i am only able to get it to work pulling in a particular category. i’d like to be able to specify that it shows work from ALL categories except for two, or maybe pick only two or three that it pulls from instead of excluding.

    can anyone tell me how to modify my code so it will work how i want it to?

    <div class="slideshow">
    <?php
    $containter = 1;
    $display = 1;
    ?>
    
      <?php
         query_posts('showposts=5&category_name=interactive');
         while (have_posts()) : the_post(); ?>
    
    <?php
    if (($containter == 1) and ($display >= 1)) {
        echo "<ul style='display:none;'>";
        } elseif  ($containter == 1) {
        echo "<ul>";
        } else {}
    ?>
    
    <li>
        <div id="recent"><a href="<?php the_permalink() ?>" rel="bookmark" title="go to there: <?php the_title(); ?>"><img src="http://www.aaank.com/images/post_thumbs/_feat/<?php $values = get_post_custom_values("featThumb"); echo $values[0]; ?>" alt="" /></a>
        <div style="background-color:#FFFFFF; margin-top:-6px;">
        <hr /><p><?php if (strlen($post->post_title) > 105) {
    echo substr(the_title($before = '', $after = '', FALSE), 0, 105) . '...'; } else {
    the_title();
    } ?></p>
    
        </div>
    </li>
    
    <?php
    $containter++;
    $display++;
    ?>
    
    <?php
    if ($containter >= 1) {
    echo "</ul>"; $containter = 1;} else {}
    ?>
    
    <?php endwhile; ?>
    </div>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] make recent posts pull multiple categories, not just 1’ is closed to new replies.
Skip to toolbar