Title: problem with sliders plugin
Last modified: August 19, 2016

---

# problem with sliders plugin

 *  [Levdbas](https://wordpress.org/support/users/levdbas/)
 * (@levdbas)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/problem-with-sliders-plugin/)
 * Hello,
 * I have a problem regarding a plugin in my own theme.
 * I have a content slider included in my website following code:
 *     ```
       <div id="mygallery" class="stepcarousel">
       <div class="belt">
       	<?php $temp_query = $wp_query; ?>
               <?php query_posts('cat=3'.'&showposts=5'); ?>
               <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
       <div class="panel">
   
       <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
   
       <?php the_excerpt(); ?>
   
       <?php $gallery = get_post_meta($post->ID, 'Thumbnail', $single = true); ?>
       <img src="<?php echo $gallery ?>">
   
       </div>
   
               <?php endwhile; else: ?>
               <?php endif; ?>
   
       </div>
   
       </div>
   
       	<div class="clear"></div>
       ```
   
 * For some reason the following codeline “<?php query_posts(‘cat=3’.’&showposts
   =5′); ?>” is not really working as expected.
 * Its also changing the content of my whole page. So it even shows the content 
   from the newsslider in the main body of my site where other content like other
   page content should be. Strange thing: when I change the query_post to get_post
   its picking the content from the main content area but not from the latest posts.
 * Hope my problem is clear and hope you guys have some kind of solution.
 * link to website with the problem: [http://projectgroep3.ic3d.nl/](http://projectgroep3.ic3d.nl/)
 * Kind regards,
 * Erik

Viewing 1 replies (of 1 total)

 *  Thread Starter [Levdbas](https://wordpress.org/support/users/levdbas/)
 * (@levdbas)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/problem-with-sliders-plugin/#post-1551914)
 * It seems that the following code is creating some kind of loop that also affects
   the other parts of the website:
 *     ```
       <?php $temp_query = $wp_query; ?>
               <?php query_posts('cat=3'.'&showposts=5'); ?>
               <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
       ```
   
 * Anyone know what to do to only get the post array in the slider and not in the
   main content ?

Viewing 1 replies (of 1 total)

The topic ‘problem with sliders plugin’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Levdbas](https://wordpress.org/support/users/levdbas/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/problem-with-sliders-plugin/#post-1551914)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
