wp-bootstrap / wp-bootstrap-navwalker

A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.

Home Page:https://wp-bootstrap.github.io/wp-bootstrap-navwalker/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please set this package to use Composer Autoload

stefanobartoletti opened this issue · comments

This package doesn't seem to work with Composer Autoload.

I've seen that a similar issue was already opened #346 but I don't seem to be able to make this work.

Right now as a workaround I had to put this in my own project's composer.json:

"autoload": {
    "files": ["vendor/wp-bootstrap/wp-bootstrap-navwalker/class-wp-bootstrap-navwalker.php"]
},

But this is not needed with other packages that I use and I would prefer it wp-bootstrap-navwalker could load itself as well.

Thank you :-)

I found that, at least in a Bedrock setup, using the files autoload option, the walker gets autoloaded before WordPress is loaded, which means the Walker_Nav_Menu class can't be found.