Title: Second instance displaying same categories doesn&#039;t work.
Last modified: August 30, 2016

---

# Second instance displaying same categories doesn't work.

 *  Resolved [DarrylR](https://wordpress.org/support/users/darrylr-1/)
 * (@darrylr-1)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/second-instance-displaying-same-categories-doesnt-work/)
 * Help! I added a carousel to the home page of our site to display posts from a
   single category. This works flawlessly. I copied the same shortcode to a different
   page, and it didn’t display any posts until I changed the “categories” attribute
   to a different category ID.
 * When the plugin doesn’t display any posts, the following error appears in the
   Chrome Developer console:
    Uncaught SyntaxError: Unexpected token <
 * The error is thrown because the plugin generates the following html (Notice the
   erroneous paragraph element </p> within the javascript.):
    <p><script type=”text/
   javascript”> jQuery(document).ready(function(e) { var wpPostsCarousel12197 = 
   jQuery(“#wp-posts-carousel-12197”); wpPostsCarousel12197.owlCarousel({ loop: 
   true, nav: true, navSpeed: 800, dots: false, dotsSpeed: 800, lazyLoad: false,
   autoplay: true, autoplayHoverPause: true, autoplayTimeout: 7000, autoplaySpeed:
   800, margin: 5, stagePadding: 0, freeDrag: false, mouseDrag: true, touchDrag:
   true, slideBy: 1, fallbackEasing: “linear”, responsiveClass: true, navText: [“
   previous”, “next” ], responsive:{ 0:{ items: 1 }, 600:{ items: 1,</p> <p> }, 
   1000:{ items: 1 } }, autoHeight: false }); wpPostsCarousel12197.on(“mousewheel”,“.
   owl-stage”, function(e) { if (e.deltaY > 0) { wpPostsCarousel12197.trigger(“next.
   owl”); } else { wpPostsCarousel12197.trigger(“prev.owl”); } e.preventDefault();});});
   </script></div>
 * [https://wordpress.org/plugins/wp-posts-carousel/](https://wordpress.org/plugins/wp-posts-carousel/)

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

 *  Thread Starter [DarrylR](https://wordpress.org/support/users/darrylr-1/)
 * (@darrylr-1)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/second-instance-displaying-same-categories-doesnt-work/#post-6613758)
 * I can add two instances of the carousel displaying posts from the same category
   to the same page without issue. The problem occurs if I try to add an identical
   instance of the carousel to another page.
 * Thanks!
 *  Thread Starter [DarrylR](https://wordpress.org/support/users/darrylr-1/)
 * (@darrylr-1)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/second-instance-displaying-same-categories-doesnt-work/#post-6614040)
 * I realize that this one is weird, and that is probably why no one has responded.
   I tried to replicate the problem on a publicly accessible site running the same
   theme with the same activated plugins, and it didn’t occur. It only occurs on
   our staging site. Has anyone else experienced this behavior? I thought for sure
   it was a conflict with another plugin, but it doesn’t appear to be.
 * Thanks!
 *  Plugin Author [teastudio.pl](https://wordpress.org/support/users/teastudiopl/)
 * (@teastudiopl)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/second-instance-displaying-same-categories-doesnt-work/#post-6614053)
 * could you send me the website address where you have a problem with second instance
   of the carousel? [m.gierada@teastudio.pl](https://wordpress.org/support/topic/second-instance-displaying-same-categories-doesnt-work/m.gierada@teastudio.pl?output_format=md)
 *  Plugin Author [teastudio.pl](https://wordpress.org/support/users/teastudiopl/)
 * (@teastudiopl)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/second-instance-displaying-same-categories-doesnt-work/#post-6614154)
 * If you need any help, please contact me.
    close

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

The topic ‘Second instance displaying same categories doesn't work.’ is closed to
new replies.

 * ![](https://ps.w.org/wp-posts-carousel/assets/icon-128x128.png?rev=1154352)
 * [WP Posts Carousel](https://wordpress.org/plugins/wp-posts-carousel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-posts-carousel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-posts-carousel/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-posts-carousel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-posts-carousel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-posts-carousel/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [teastudio.pl](https://wordpress.org/support/users/teastudiopl/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/second-instance-displaying-same-categories-doesnt-work/#post-6614154)
 * Status: resolved