Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn to Create WordPress Themes by Building 5 Projects

You're reading from   Learn to Create WordPress Themes by Building 5 Projects Master the fundamentals of WordPress theme development and create attractive WordPress themes from scratch

Arrow left icon
Product type Paperback
Published in Dec 2017
Publisher Packt
ISBN-13 9781787286641
Length 458 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Eduonix Learning Solutions Eduonix Learning Solutions
Author Profile Icon Eduonix Learning Solutions
Eduonix Learning Solutions
Arrow right icon
View More author details
Toc

Building a Bootstrap theme

In our previously created template, we have a standard Bootstrap navbar up, and you can see that we have a drop down:

The way that we got to do the drop-down functionality was by using the wp-bootstrap-navwalker class at www.github.com/twittem/wp-bootstrap-navwalker shown in the following screenshot:

This is the most common and, probably, the easiest way to integrate a Bootstrap navbar with the drop-down functionality in WordPress. Let's implement that.

As seen earlier, we have the search box up on our WordPress page. We have some custom code in the header file that allows us to use the search box and have it work correctly, and this will work for posts and pages.

For instance, if I type lorem and hit the Search button, it's going to bring back everything that has the word lorem in it:

If we go to the backend, we can see we have some posts...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime