Title: Doesn&#039;t work with Display posts shortcode
Last modified: September 3, 2016

---

# Doesn't work with Display posts shortcode

 *  [aheli](https://wordpress.org/support/users/aheli/)
 * (@aheli)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/doesnt-work-with-display-posts-shortcode/)
 * I tried with 3.7 and 4.0 WP version.
    The first post of the carousel is ok and
   after the others posts are not shown using Display posts shortcode attribute.

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

 *  Plugin Author [Peter J. Herrel](https://wordpress.org/support/users/donutz/)
 * (@donutz)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/doesnt-work-with-display-posts-shortcode/#post-7892563)
 * I tested with WP 4.0, Twenty Fourteen, and the latest versions of the plugins,
   and it works just fine.
 * Example code:
 * `[display-posts posts_per_page="10" include_excerpt="true" image_size="large"
   bootstrap="1"]`
 * Make sure the posts you’re querying actually have thumbnails attached to them.
 * If you’re having trouble with the software, you could consider posting in the
   [support forums](https://wordpress.org/support/plugin/wp-bootstrap-carousel) 
   first, instead of giving bad reviews. Just saying 😉
 *  Thread Starter [aheli](https://wordpress.org/support/users/aheli/)
 * (@aheli)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/doesnt-work-with-display-posts-shortcode/#post-7892564)
 * In fact, before posting a review I checked the support messages and I saw I have
   the same problem as it is describe in the latest thread.
    The subject is metionned“
   closed” but it is wrong : you didn’t answer to Jon’s last question : “Thanks 
   Peter,
 * I added the bootstrap=”1″ parameter to my [display-posts] shortcode and I DO 
   see the L- and R-side paging arrows. Additionally, I am seeing what I expect,
   code-wise, when I ‘inspect element’ of the page. My posts are there in the DOM.
   The problem is that they are not displaying on the page and the height of containing
   div’s seems to be 0px;
 * [display-posts category=”carousel” bootstrap=”1″]
 * Any ideas why?
    Thanks so much for whatever guidance you could provide. Jon”
 *  Plugin Author [Peter J. Herrel](https://wordpress.org/support/users/donutz/)
 * (@donutz)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/doesnt-work-with-display-posts-shortcode/#post-7892565)
 * That topic was marked as resolved because it DOES work with the DPS plugin (see
   the title of the topic). The 0px is another issue which strictly speaking should
   be investigated and dealt with in another support topic.
 * In your (and Jon’s) case, as it works fine with the wp defaults, some plugin 
   or theme element must be interfering, I guess. I’m happy to help you sort it 
   out. Are you using a theme that is freely available? Is your theme or one of 
   your plugins maybe enqueueing bootstrap scripts?
 *  Thread Starter [aheli](https://wordpress.org/support/users/aheli/)
 * (@aheli)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/doesnt-work-with-display-posts-shortcode/#post-7892567)
 * Thanks for help, appreciate!
    The theme is a pro one bought on envato : Royal
   Gold. I’ve downloaded and installed the last version. Here is an example of the
   pb : [http://demeuresdorient.com/test-wp-bootstrap-carousel/](http://demeuresdorient.com/test-wp-bootstrap-carousel/)
   And my shortcode attributes : [display-posts posts_per_page=”10″ include_excerpt
   =”true” image_size=”medium” bootstrap=”1″ category=”offres” width=”300″] Thanks
 *  Plugin Author [Peter J. Herrel](https://wordpress.org/support/users/donutz/)
 * (@donutz)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/doesnt-work-with-display-posts-shortcode/#post-7892568)
 * Looks like the carousel items are wrapped in p tags, to which the active class
   is applied. Did you put the shortcode in a text widget? If so, maybe take a look
   at the solution provided here: [http://wordpress.stackexchange.com/q/49077](http://wordpress.stackexchange.com/q/49077).
   You could also use the [`do_shortcode`](http://codex.wordpress.org/Function_Reference/do_shortcode)
   template tag to embed the slider directly in your sidebar e.g.:
 * `echo do_shortcode( '[display-posts posts_per_page="10"]' );`
 *  Thread Starter [aheli](https://wordpress.org/support/users/aheli/)
 * (@aheli)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/doesnt-work-with-display-posts-shortcode/#post-7892569)
 * No, shortcode is directly written in content area, without any html tags, as 
   you can see in this screenshot :
    [http://demeuresdorient.com/wordpress/wp-content/uploads/2014/10/test-wp-carousel-shortcode.pdf](http://demeuresdorient.com/wordpress/wp-content/uploads/2014/10/test-wp-carousel-shortcode.pdf)
 *  Plugin Author [Peter J. Herrel](https://wordpress.org/support/users/donutz/)
 * (@donutz)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/doesnt-work-with-display-posts-shortcode/#post-7892570)
 * OK. Still, I have strong suspicions the [wpautop](http://codex.wordpress.org/Function_Reference/wpautop)
   filter is messing things up. You might want to run a search on your theme files
   to see if the theme author has fiddled with `wpautop`. Maybe take a look at the
   solutions provided here: [http://ipanelthemes.com/kb/misc/wordpress/fixing-themes-custom-wpautop-priority/](http://ipanelthemes.com/kb/misc/wordpress/fixing-themes-custom-wpautop-priority/).
   It could be as simple as adding the following to your `functions.php` file (or
   a custom plugin):
 *     ```
       remove_filter( 'the_content', 'wpautop' );
       add_filter( 'the_content', 'wpautop', 999 );
       ```
   
 *  Thread Starter [aheli](https://wordpress.org/support/users/aheli/)
 * (@aheli)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/doesnt-work-with-display-posts-shortcode/#post-7892573)
 * Thank you but I added these two lines to the end of my functions.php file and
   it still doesn’t work. Anyway the other shortcodes are working ?
 *  Plugin Author [Peter J. Herrel](https://wordpress.org/support/users/donutz/)
 * (@donutz)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/doesnt-work-with-display-posts-shortcode/#post-7892575)
 * It’s kinda hard to diagnose without access to the source code of your theme and
   plugins. You could disable your plugins one by one to try and isolate the culprit.
   As for a quickfix, the following jQuery could do the trick:
 * `jQuery(document).ready(function($){$('p:empty').remove();});`

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

The topic ‘Doesn't work with Display posts shortcode’ is closed to new replies.

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

 * 9 replies
 * 2 participants
 * Last reply from: [Peter J. Herrel](https://wordpress.org/support/users/donutz/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/doesnt-work-with-display-posts-shortcode/#post-7892575)