Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Responsive Navbar for WordPress

Featured Replies

Hello Web Designers & Developers!

 

In fear of losing all sanity in trying to go alone, I'm looking for some help with creating a responsive navbar similar to Bootstrap or Foundation.

 

The site in question has initially been built with Zurb's Foundation but ideally I am looking at rewriting the lot with a semantic grid of sorts. In the meantime, I have been trying to transfer the existing static site into a WordPress one. No problems until it comes to reworking the navbar. I just can't get my head around it!

 

Eventually I came across a Treehouse tutorial that showed how to convert Bootstrap into WordPress but did not go into detail regarding dropdowns (the site I'm working on has a dropdown menu). Obvious solution would be to use a premade starter such as BootstrapWP but I'm reluctant to have lots of code included that I do not understand (I tried deleting code I didn't think I needed and 'broke' my localhost site). I have made a WordPress theme from scratch but my knowledge in WordPress does not go as far as said navigation styles. I also tried Concrete which was super simple, but I hit the same hurdle of converting the navbar and reluctant to have paid $40 for a plugin.

 

In summary, I would like to make the site with Bones but with a top navbar similar to Bootstrap or Foundation (I don't actually need all the features other than that). I currently see the options as using an existing starter theme, purchasing a plugin or doing it myself (my preference). Does anyone know of a good tutorial for what I've covered? I have a wealth of ebooks I bought over Christmas, but none of the books goes into detail on navigations!

 

Any pointers and advice would be greatly appreciated.

 

Thank you in anticipation!

Marvellous! Thanks a lot for that, Inspired.

 

I have to hit the sack now, but I've bookmarked your blog and will go through once I surface. I'm a bit of a jQuery boy scout, but I like what I see.

I had this issue recently too. I'm using bootstrap on almost everything now but I hated the responsive navigation markup. Now I just code the bar as I would have done if it wasn't responsive and use some javascript I found on a tutorial to convert the menu into a select menu when the page is loaded in a window under a specific size. I'm not great with javascript so I haven't yet figured out how to get it to switch between something like (nav.main-nav ul > nav.main-nav select) and then back again when the window is resized. At the moment it happens when the page is loaded. As a back up, I still write some css as a worse case scenario if the window is resized so it doesn't look too bad. Infact I'd love it if anyone could take a look at one of my working examples and see if they could show me how to improve the javascript. Latest example is www.diamonddecorators.co.uk

We're just adding the final touches to a new website we've built from scratch using Thematic, Bootstrap and Wordpress.

 

To make WordPress's menu work with BS try googling "custom_walker bootstrap". This function hook into WordPress's wp_nav_menu function and allows you to modify the menu before it's rendered to the page. We've used it to fully implement the main boostrap menu. We'e also written a custom walker to render the stackable navs.

 

Alternatively you could dig around in bootstrapwp and pull out their customer walker. I believe it's available on a GNU General Public License so you're free to hack away!

 

Good luck!

 

Rich

Edited by eCenica

Excellent advice, Rich. Thank you. I haven't ventured with custom walker's yet and have noticed them about, so no doubt the way forward.

 

I look forward to seeing how your updated navigation looks like when it's ready.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.