• Resolved gonzalogg

    (@gonzalogg)


    Hi, I’m trying to use bootstrap with Contact Form 7.

    I followed this tutorial: Bootstrap 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://www.ads-software.com/plugins/bootstrap-modals/

Viewing 1 replies (of 1 total)
  • Plugin Author neilgee

    (@neilgee)

    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.