Title: Bootstrap code problem (functions.php)
Last modified: August 31, 2016

---

# Bootstrap code problem (functions.php)

 *  Resolved [gonzalogg](https://wordpress.org/support/users/gonzalogg/)
 * (@gonzalogg)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/bootstrap-code-problem-functionsphp/)
 * Hi, I’m trying to use bootstrap with Contact Form 7.
 * I followed this tutorial: [Bootstrap Modal + Contact Form 7](https://github.com/thebeckyhamm/modal-contact-form-7)
   but when i insert the code in functions.php worpress say it has an error. The
   code:
 *     ```
       function BH_scripts() {
   
            wp_enqueue_script( 'bootstrap-modal', get_template_directory_uri() . '/scripts/modal.min.js', array(), null, true );
   
           wp_register_style( 'modal-css', get_template_directory_uri().'/css/modal.css', array(), null, 'all' );
           wp_enqueue_style( 'modal-css' );
       }
   
       add_action( 'wp_enqueue_scripts', 'BH_scripts' );
       ```
   
 * I’m not sure if i’m inserting the code on the right place, or if i have to modify
   something else.
 * The idea is to generate a lightbox with the contact form using Bootstrap.
 * Any help is appreciated!
    Thanks in advance.
 * [https://wordpress.org/plugins/bootstrap-modals/](https://wordpress.org/plugins/bootstrap-modals/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [neilgee](https://wordpress.org/support/users/neilgee/)
 * (@neilgee)
 * [10 years ago](https://wordpress.org/support/topic/bootstrap-code-problem-functionsphp/#post-7238146)
 * The bootstrap js and CSS are already registered and enqueued with the plugin –
   there is no need to add them in another function.

Viewing 1 replies (of 1 total)

The topic ‘Bootstrap code problem (functions.php)’ is closed to new replies.

 * ![](https://ps.w.org/bootstrap-modals/assets/icon-256x256.jpg?rev=983429)
 * [Bootstrap Modals](https://wordpress.org/plugins/bootstrap-modals/)
 * [Support Threads](https://wordpress.org/support/plugin/bootstrap-modals/)
 * [Active Topics](https://wordpress.org/support/plugin/bootstrap-modals/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bootstrap-modals/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bootstrap-modals/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [neilgee](https://wordpress.org/support/users/neilgee/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/bootstrap-code-problem-functionsphp/#post-7238146)
 * Status: resolved