{"id":15180355,"url":"https://github.com/alexweblab/bootstrap-5-wordpress-navbar-walker","last_synced_at":"2025-04-06T10:12:34.340Z","repository":{"id":42508178,"uuid":"322512617","full_name":"AlexWebLab/bootstrap-5-wordpress-navbar-walker","owner":"AlexWebLab","description":"Bootstrap 5 WordPress navbar walker menu.","archived":false,"fork":false,"pushed_at":"2023-12-08T20:30:36.000Z","size":20,"stargazers_count":262,"open_issues_count":12,"forks_count":106,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-06T10:12:22.680Z","etag":null,"topics":["bootstrap-5","bootstrap5","navwalker","wordpress","wordpress-theme"],"latest_commit_sha":null,"homepage":"https://github.com/AlexWebLab/bootstrap-5-wordpress-navbar-walker","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexWebLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-18T06:45:00.000Z","updated_at":"2025-03-20T22:57:06.000Z","dependencies_parsed_at":"2024-12-16T05:05:42.636Z","dependency_job_id":"6c63ae5c-2d0f-4683-85d1-775f1ecc4b64","html_url":"https://github.com/AlexWebLab/bootstrap-5-wordpress-navbar-walker","commit_stats":{"total_commits":14,"total_committers":4,"mean_commits":3.5,"dds":0.4285714285714286,"last_synced_commit":"5247d9eb035a0637e3478982ea911aaf78a2f2ed"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWebLab%2Fbootstrap-5-wordpress-navbar-walker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWebLab%2Fbootstrap-5-wordpress-navbar-walker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWebLab%2Fbootstrap-5-wordpress-navbar-walker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWebLab%2Fbootstrap-5-wordpress-navbar-walker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexWebLab","download_url":"https://codeload.github.com/AlexWebLab/bootstrap-5-wordpress-navbar-walker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464222,"owners_count":20942970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap-5","bootstrap5","navwalker","wordpress","wordpress-theme"],"created_at":"2024-09-27T16:04:03.852Z","updated_at":"2025-04-06T10:12:34.321Z","avatar_url":"https://github.com/AlexWebLab.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bootstrap 5 WordPress navbar walker menu\n[bootstrap-5-wordpress-navbar-walker](https://github.com/AlexWebLab/bootstrap-5-wordpress-navbar-walker)\n## How to use:\n1. Copy and paste the [bootstrap_5_wp_nav_menu_walker](https://github.com/AlexWebLab/bootstrap-5-wordpress-navbar-walker/blob/main/functions.php) class into the functions.php file of your theme;\n2. Register a new menu by adding the follow code into the functions.php file of your theme:\n```php\nregister_nav_menu('main-menu', 'Main menu');\n```\n3. Add the following html code in your header.php file or wherever you want to place your menu:\n```html\n\u003cnav class=\"navbar navbar-expand-md navbar-light bg-light\"\u003e\n    \u003cdiv class=\"container-fluid\"\u003e\n        \u003ca class=\"navbar-brand\" href=\"#\"\u003eNavbar\u003c/a\u003e\n        \u003cbutton class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#main-menu\" aria-controls=\"main-menu\" aria-expanded=\"false\" aria-label=\"Toggle navigation\"\u003e\n            \u003cspan class=\"navbar-toggler-icon\"\u003e\u003c/span\u003e\n        \u003c/button\u003e\n        \n        \u003cdiv class=\"collapse navbar-collapse\" id=\"main-menu\"\u003e\n            \u003c?php\n            wp_nav_menu(array(\n                'theme_location' =\u003e 'main-menu',\n                'container' =\u003e false,\n                'menu_class' =\u003e '',\n                'fallback_cb' =\u003e '__return_false',\n                'items_wrap' =\u003e '\u003cul id=\"%1$s\" class=\"navbar-nav me-auto mb-2 mb-md-0 %2$s\"\u003e%3$s\u003c/ul\u003e',\n                'depth' =\u003e 2,\n                'walker' =\u003e new bootstrap_5_wp_nav_menu_walker()\n            ));\n            ?\u003e\n        \u003c/div\u003e\n    \u003c/div\u003e\n\u003c/nav\u003e\n```\n### v1.3.0 Added support for dropdown menu (responsive) alignment: https://getbootstrap.com/docs/5.0/components/dropdowns/#menu-alignment\n\n**Here is how it works**:\n- From _Appearance -\u003e Menus_ page of WordPress, check the _CSS Classes_ checkbox under _Screen Options_;\n- Add a _Custom Link_ with \"#\" in the URL field (this would be the parent of your dropdown);\n- On the _CSS Classes_ field add any of the following alignment classes: 'dropdown-menu-start', 'dropdown-menu-end', 'dropdown-menu-sm-start', 'dropdown-menu-sm-end', 'dropdown-menu-md-start', 'dropdown-menu-md-end', 'dropdown-menu-lg-start', 'dropdown-menu-lg-end', 'dropdown-menu-xl-start', 'dropdown-menu-xl-end', 'dropdown-menu-xxl-start', 'dropdown-menu-xxl-end';\n- If any of the mentioned above class is detected, then they will automatically copied into the _ul.dropdown-menu_ element following the Bootstrap 5 structure;\n- Any other class that is not related to the dropdown menu alignment will stay where it is.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexweblab%2Fbootstrap-5-wordpress-navbar-walker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexweblab%2Fbootstrap-5-wordpress-navbar-walker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexweblab%2Fbootstrap-5-wordpress-navbar-walker/lists"}