Title: Random banner shortcode
Last modified: February 22, 2018

---

# Random banner shortcode

 *  [slamorte](https://wordpress.org/support/users/slamorte/)
 * (@slamorte)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/random-banner-shortcode/)
 * The instructions say:
 * > To output a Random Banner, place the following shortcode in the desired area
   > of the Page or Post Content:
   >  [banner]
 * However when I use the [banner] shortcode it display all banners one after the
   other.
 * Is there a way to display just one random banner?

Viewing 1 replies (of 1 total)

 *  Thread Starter [slamorte](https://wordpress.org/support/users/slamorte/)
 * (@slamorte)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/random-banner-shortcode/#post-10005327)
 * Solved. Use:
 * `[banner count=1]` or
 * `[banner group='group-name' count=1]`
 * This is because the code sets the default count to -1 which will show all banners.
 * Now to fix the bad CSS.
    -  This reply was modified 8 years, 1 month ago by [slamorte](https://wordpress.org/support/users/slamorte/).

Viewing 1 replies (of 1 total)

The topic ‘Random banner shortcode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-banners_ffffff.svg)
 * [Custom Banners](https://wordpress.org/plugins/custom-banners/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-banners/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-banners/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-banners/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-banners/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-banners/reviews/)

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [slamorte](https://wordpress.org/support/users/slamorte/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/random-banner-shortcode/#post-10005327)
 * Status: not resolved