• Resolved Menashay

    (@menashay)


    Hi There,
    After installing this plugin site submenus do not work (nothing to do with private pages simply the site main menu)
    I verified this issue by deactivating the plugin.
    See websiste leorababycentre.vic.edu.au –> Website Policies to see that menu does not dropdown. Inspect the object and see it is pretty much a stock standard bootstrap component.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Menashay

    (@menashay)

    OK got it to work by adding
    add_theme_support(‘customer-area.library.bootstrap.dropdown’);
    to the themes file functions.php

    Plugin Contributor Vincent Mimoun-Prat

    (@vprat)

    Hi,

    Glad you got it working. We have a documentation page about resolving conflicts with themes using Bootstrap just in case.

    Hi,

    I have the same issue, dropdown menu not showing, because of my theme’s Bootstrap overriding WPCA Bootstrap (Beaver Builder Theme).

    It works OK with this added to function.php:

    add_theme_support(‘customer-area.library.bootstrap.dropdown’);

    BUT it causes side effects that make WPCA unusable: WPCA frame is not resized to display all it’s content now.

    So i tried solution #2, disable my theme’s Bootstrap with this:

    function fix_cuar_and_theme_bootstrap_conflict(){
        if (function_exists('cuar_is_customer_area_page')
            && (cuar_is_customer_area_page(get_queried_object_id())
                || cuar_is_customer_area_private_content(get_the_ID())))
        {
            wp_dequeue_script('bootstrap');
        }
    }
    add_action('wp_enqueue_scripts', 'fix_cuar_and_theme_bootstrap_conflict', 20);

    But it has no effect on dropdown menu still not showing up.

    Maybe i didn’t customized this correctly for Beaver Builder Theme’s Bootstrap(?):

    wp_dequeue_script('bootstrap');

    Thanks for your informations!

    I finally found a patch here: https://ww.wp.xz.cn/support/topic/resolving-bootstrap-conflict/

    Add this script to WP Customizer > Code > Footer:

    <script type="text/javascript">
    jQuery(document).ready(function ($) {
    $('body.customer-area .dropdown-toggle').click(function(){
    $(this).parent().toggleClass('open');
    });
    });
    </script>

    Not sure it’s the best way to solve Bootstrap conflict but it does the job 😉

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

The topic ‘Bootstrap dropdown blocked’ is closed to new replies.