WordPress.org

Forums

Blue Planet
[resolved] Change responsive menu activation (3 posts)

  1. michaeljmac
    Member
    Posted 1 year ago #

    Is there any way to change the width at which the mobile menu appears?

  2. Nilambar Sharma
    Member
    Theme Author

    Posted 1 year ago #

    Currently there is no options available in Theme Options for this feature. If you want to customize it then you need to make a child theme and modify accordingly.

    function bpchild_remove_scripts() {
        // Dequeue JS of parent theme
        wp_dequeue_script( 'blue-planet-theme-script-custom' );
        // Now add you own JS file
        wp_enqueue_script('bpchild-theme-script-custom',get_stylesheet_directory_uri().'/js/custom.js', array('jquery'),'1.0', TRUE);
    }
    add_action( 'wp_enqueue_scripts', 'bpchild_remove_scripts', 20 );

    Now in the script file, copy content from parent theme and paste it in our file.

    jQuery(document).ready(function($){
        jQuery('nav#site-navigation').meanmenu({
          meanScreenWidth: "640"
        });
    });

    To change the trigger point of mobile menu, change number in place of "640". Default value is 640. Number represents the screen size in pixel.

  3. Nilambar Sharma
    Member
    Theme Author

    Posted 1 year ago #

    Hope you got what you needed.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic