Comments (5)
I get the same results on Win7/Firefox. When resizing the window, the menu changes to a dropdown as expected but the dropdown button does not reveal the menu.
EDIT: Same symptoms in Chrome, Opera, Safari and IE.
from wordpress-bootstrap.
Does this happen for everybody? I need to find out if it is wp-bootstrap or some other code causing this issue.
from wordpress-bootstrap.
I found that script minification was causing this issue (for me anyway). When I disabled JS minification in W3TotalCache the menu works as expected.
Just to be clear, the problem is with the bootstrap collapse plugin not the bootstrap dropdown plugin (both of which are included in /library/js/script.js)
from wordpress-bootstrap.
Any other way to make it work without w3totalcache ?
from wordpress-bootstrap.
Any updates on resolving this issue?
Update: I found the problem with my installation (might just because I'm a Wordpress newbie): I was not including the bootstrap-collapse javascript.
Solution Attempt #1
Edit wp-bootstrap: Theme Functions (functions.php) to add <script>
tags to load bootstrap-collapse.js
:
Appearance > Editor > Theme Functions (functions.php)
function my_scripts_method() {
// bootstrap-collapse requires bootstrap-transition.js
wp_deregister_script('bootstrap-transition');
wp_register_script('bootstrap-transition', 'http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js');
wp_enqueue_script('bootstrap-transition');
wp_deregister_script('bootstrap-collapse');
wp_register_script('bootstrap-collapse', 'http://twitter.github.com/bootstrap/assets/js/bootstrap-collapse.js');
wp_enqueue_script('bootstrap-collapse');
}
add_action('wp_enqueue_scripts', 'my_scripts_method');
Note: this is probably not the right way to do this, but it works.
Solution Attempt #2
Edit wp-bootstrap: Header (header.php) to make navbar
collapsed by default and remove toggle button:
-
Add
collapse
class to thediv
:<div class="nav-collapse collapse"> <?php bones_main_nav(); // Adjust using Menus in Wordpress Admin ?> </div>
-
Remove toggle button, i.e. remove this code:
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a>
from wordpress-bootstrap.
Related Issues (20)
- Javascript Live Reload
- Main site down HOT 1
- Cannot access global $wp_query;
- Can't make it work on windows+wamp HOT 2
- Font Awesome not working HOT 8
- Drop down menu isn't working HOT 2
- Nav Item > Child > Child does not open on click HOT 5
- Is development on this theme dead? HOT 22
- Keeping npm and bower up to date HOT 2
- Can use this themes in shared hosting ? (cant npm) HOT 3
- How to Change default boostrap theme to bootswatch cyborg
- Importing Custom fonts in theme
- Wrong call for previous and next posts link in index.php
- Where Are [caption] tags being stripped put
- Limited number of Menus
- I recommend moving to this project
- second level menu not working HOT 2
- Demo Not Working
- collapsed menu
- I'd like to update the versions and documentation HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-bootstrap.