Title: Make script block optional via settings
Last modified: August 22, 2016

---

# Make script block optional via settings

 *  Resolved [studio4](https://wordpress.org/support/users/studio4/)
 * (@studio4)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/make-script-block-optional-via-settings/)
 * Hello,
 * Great plugin – I do have a suggestion though:
 * It would be very useful if you could choose, from within the carousel settings,
   if you wish to control the carousel with data-attributes or the script block.
   In the theme we are working on the script block found on line 746 of cpt-bootstrap-
   carousel.php causes a javascript error since bootstrap is loaded in the footer:
 *     ```
       <script type="text/javascript">
       jQuery(document).ready(function() {
       jQuery('#cptbc_<?php echo $id; ?>').carousel({
       	interval: <?php echo $atts['interval']; ?>
       	});
       });
       </script>
       ```
   
 * As it’s possible to set the interval with a data attribute e.g. data-interval
   =”” [http://getbootstrap.com/javascript/#carousel-options](http://getbootstrap.com/javascript/#carousel-options)
   I would propose it is either replaced with a data attribute or at least controlled
   from within the settings page.
 * Many thanks
 * [https://wordpress.org/plugins/cpt-bootstrap-carousel/](https://wordpress.org/plugins/cpt-bootstrap-carousel/)

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

 *  Plugin Author [Phil Ewels](https://wordpress.org/support/users/tallphil/)
 * (@tallphil)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/make-script-block-optional-via-settings/#post-5746881)
 * Hi studio4,
 * Thanks for the feedback – you’ll be pleased to hear that I have actually already
   implemented exactly this feature! It’s in the beta version of the next release,
   available on github: [https://github.com/ewels/cpt-bootstrap-carousel](https://github.com/ewels/cpt-bootstrap-carousel)
 * In that version there is an option in the settings as to whether to use the javascript
   or not.. I really need to release it soon, I keep telling people to use the beta.
   I’ll try to find time when I can 🙂
 * Phil
 *  Plugin Author [Phil Ewels](https://wordpress.org/support/users/tallphil/)
 * (@tallphil)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/make-script-block-optional-via-settings/#post-5747179)
 * To follow up – I just released an update on wordpress.org, so you can update 
   through normal procedures to get this now.
 * Phil

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

The topic ‘Make script block optional via settings’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cpt-bootstrap-carousel_b8b7ae.svg)
 * [CPT Bootstrap Carousel](https://wordpress.org/plugins/cpt-bootstrap-carousel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cpt-bootstrap-carousel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/)
 * [Active Topics](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cpt-bootstrap-carousel/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Phil Ewels](https://wordpress.org/support/users/tallphil/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/make-script-block-optional-via-settings/#post-5747179)
 * Status: resolved