Title: Rollover with loop query_posts.
Last modified: August 19, 2016

---

# Rollover with loop query_posts.

 *  Resolved [m.altieri](https://wordpress.org/support/users/maltieri-1/)
 * (@maltieri-1)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/rollover-with-loop-query_posts/)
 * Hello,
 * I am working on a drop down menu with rollovers that gives me a very annoying
   problem. The menu is done with lists < li > and < ul >. Then, introducing the
   label < li > in the loop, everything is active in the rollover.
 * Here’s the code
 *     ```
       <li>
       <ul>
       <?php query_posts('cat=3&showposts=10'); ?>
         <li><?php while (have_posts()) : the_post(); ?>
          <a href="<?php the_permalink();?>"><?php the_title(); ?></a>
         <?php endwhile;?>
   
       </li>
       </ul>
       ```
   
 * And here’s the URL in what I’m working.
    [http://laboratoire-sisvita-swiss.com.mialias.net](http://laboratoire-sisvita-swiss.com.mialias.net)
   The problem is in the category Productos (Products)
 * Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/rollover-with-loop-query_posts/#post-1401781)
 * if i understood what you want, you could try and move the `<li>` into the loop–
   like so:
 *     ```
       <li>
       <ul>
       <?php query_posts('cat=3&showposts=10'); ?>
         <?php while (have_posts()) : the_post(); ?>
          <li><a href="<?php the_permalink();?>"><?php the_title(); ?></a></li>
         <?php endwhile;?>
   
       </ul>
       ```
   
 *  Thread Starter [m.altieri](https://wordpress.org/support/users/maltieri-1/)
 * (@maltieri-1)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/rollover-with-loop-query_posts/#post-1401796)
 * Oh, you’re right… How silly I was.
    Thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Rollover with loop query_posts.’ is closed to new replies.

## Tags

 * [query_post](https://wordpress.org/support/topic-tag/query_post/)
 * [rollover](https://wordpress.org/support/topic-tag/rollover/)

 * 2 replies
 * 2 participants
 * Last reply from: [m.altieri](https://wordpress.org/support/users/maltieri-1/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/rollover-with-loop-query_posts/#post-1401796)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
