Hook Gallery Shortcode With Twitter Bootstrap Carousel In WordPress

Agnosia Bootstrap Carousel is the brand new WordPress plugin that hooks the [galleryi] shortcode with attribute type="carousel" for showing a Bootstrap Carousel based on the selected images and their titles and descriptions.

It assumes either of your theme includes necessary Bootstrap javascript and CSS for displaying carousel in a proper way, or if you have included those files on your own. The plugin doesn’t includes the files for you, so in-case if they are not present then then plugin’s carousel will not work and you will only get its bare HTML.

For Example:

Required Attributes:

  • type: it needs to be type="carousel".
  • ids: you must provide a list of ids corresponding to attachments, like ids="1,2,3".

Otherwise, the default [gallery] shortcode function will be processed instead of this plugin’s one.

Optional Attributes:

  • name: any name. String will be sanitize to be used as an HTML ID. Recomended when you want to have more than one carousel in the same page. Default: agnosia-bootstrap-carouselExample: 

  • indicators: indicators position. Accepted values: before-innerafter-innerafter-control,false (hides indicators). Default: before-innerExample: 

  • control: control arrows display. Accepted values: true (to show), false (to hide).Default: trueExample: 

  • interval: the amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. Default: 5000Example: 

  • pause: pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. Default: “hover”Example: 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.