Support » Plugins and Hacks » multiple loops more categories

multiple loops more categories

  • hi… i have tow loops working… but into the small one i need 2 or more categories.. right now the code is

    $my_query = new WP_Query(‘category_name=Sport&showposts=10’);

    if( $my_query->have_posts() ) : ?>

  • <h2>Altri articoli</h2>
    <ul class=”bor”>


    while ($my_query->have_posts()) : $my_query->the_post();


    <li id=”post-<?php the_ID(); ?>“>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>“><?php the_title(); ?> <?php the_excerpt_reloaded(0, ”, ‘none’, TRUE, ‘>>>’, FALSE, 2); ?>

  • <?php endwhile; ?>

    <?php endif; ?>

    i need to add another category to the query but i’m getting only errors

    $my_query = new WP_Query(‘category_name=Sport AND ANOTHER CATEGORY HERE&showposts=10’);

    how i can fo that?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘multiple loops more categories’ is closed to new replies.