Mobile navbar doesnt work

mobile navigation menu doesnt work at all. do you know why ?

also where to add media queries in new roots theme ? before was in app file .

Two reasons your navbar isn’t working on mobile: (1) Your JavaScript is missing and (2) your .navbar-toggle is present but its background color is set to transparent.

In Roots 7 you can add media queries in any of the assets/less/ files and they should end up in your stylesheet.

what javascript is missing? i havent delete any js file. I dont have any errors at all.

Your scripts.js file is nowhere to be found.

Please re-read the documentation on the new Grunt workflow and commands.

dont understand what you mean:
can you tell me what to do please.

Previously, every time you updated your CSS or JS (or minified files), changes to lib/scripts.php had to be committed to the repo. The repo no longer includes any generated front-end assets. Grunt tasks are now split into: dev and build.

dev: runs JSHint, compiles your LESS (non-minified) and concatenates your JS.
build: task runs JSHint, compiles and minifies your LESS, runs UglifyJS for concatenation and minification, generates a lean Modernizr build, and revisions CSS and JS based on the hashes.
During build, assets-manifest.json is generated with the names of the revisioned files. lib/scripts.php reads that file and tells WordPress the correct path to the assets.

can you please tell me what to do ? i read again but dont understand :frowning:

What did you try and which part do you not understand?

  1. npm install grunt
  2. grunt watch

Dont understand that Grutn tasks are split into de and build. Dont know how to install the JS .

Do I need to type some command. In the previous version was working without anything. thanks

See this post: How to correctly add bxslider to my theme

so i ran these 3 commands and still nothing: i am not using bedrock so added line to wp-config

grunt dev — Compile LESS to CSS, concatenate and validate JS
grunt watch — Compile assets when file changes are made
grunt build — Create minified assets that are used on non-development environments
If you set define(‘WP_ENV’, ‘development’); in your wp-config.php then Roots will not use minified assets.

still my navbar doesnt work :frowning:

It also looks like you probably have an error in your PHP somewhere near the sidebar. This is what I see when I view your site’s source:

yes there is the issue, but i want to use on home page - header-home and on any page header.php. I am using this code

<?php do_action('get_header'); // Use Bootstrap's navbar if enabled in config.php if (is_page('Home')) { get_template_part('templates/header-home'); } else { get_template_part('templates/header'); } ?>

why this is not working ? thanks

ok. solved. has to be added to config.php. thanks for help cfx

Sure thing, glad you got it sorted.