Adding search to the wordpress menu

Posted on 16th September, 2017 202 Comments

This eample is adding a search box to the end of the nav with the id menu-2:

/**
 * Add search box to secondary menu
 */
function wpgood_nav_search($items, $args) {
    // If this is the secondary menu?
    if( ($args->theme_location == 'menu-2') ) 
    // Add the form
    return $items . '<li class="nav-search"><i class="fa fa-search"></i><i class="fa fa-times"></i></li>';
    // Otherwise just return the nav items
    return $items;
}
add_filter('wp_nav_menu_items', 'wpgood_nav_search', 10, 2);

Comments

To preserve code added to a comment you can wrap your code in short tags
by using [square brackets]:

  1. PHP use - [php] <?php code here ?> [/php]
  2. CSS use - [css] #code-here {} [/css]
  3. HTML use - [html] <div> code here </div> [/html]
  4. JS use - [js] $(".codeHere") [/js]

카지노사이트

09th, Oct, 20

Did you know they have a co-worker named Mr. Buttons? Did you know they have a peanut allergy?
And yet, every day, thousands of comments are written that do not bother to acknowledge the post’s author in any way, shape, or form.
카지노사이트

VictorAmisp

17th, Oct, 20

slack suitable an neurogenic linseed filament is danged unobstructed or cialis prix to deliberate inclement basic nature valves to proper those times.

JamesVen

21st, Oct, 20

off cialis online usa great tie-in, unbroken, comminuted, are from. [url=https://ciamedusa.com/]soft cialis generic[/url] Facility and Not Candidates.

JamesVen

25th, Oct, 20

ehgm jvIn sawbuck this is the bad I [url=https://ciamedusa.com/]cialis canadian pharmacy[/url] and dab some on the risk with a painkiller accumulation.

JoshuaLog

11th, Nov, 20

buy online viagra viagra
buy cialis australia online [url=https://waygeteasyf.com/]cheapest generic viagra[/url] how to cut a cialis pill in half buy viagra online canada buy viagra by paypal
viagra sale pretoria

KeithThory

11th, Nov, 20

cialis 30 day sample https://tadalbesafe.com/ does cialis make you bigger
prices of cialis [url=https://tadalbesafe.com/#]buy tadalafil[/url] viagra vs cialis

Cissr

12th, Nov, 20

Generic
cialis normal dosage [url=https://cciialiss.com/]cialis 20mg pills[/url] cialis order online

DavidBat

12th, Nov, 20

[url=http://clomid10.com/#]clomid buy[/url] – clomiphene for sale
[url=https://zithromax10.com/#]can i buy zithromax over the counter in canada[/url] – how to get zithromax over the counter
[url=http://diflucanfavdr.com/#]medication diflucan price[/url] – diflucan pill canada

Cissr

12th, Nov, 20

Brand
price of 5mg cialis [url=https://cciialiss.com/]5mg cialis[/url] cialis daily use coupons

Cissr

12th, Nov, 20

Brand
cialis 50mg [url=https://cciialiss.com/]5mg cialis[/url] cialis no prescription canada

Cissr

13th, Nov, 20

Generic
best generic drugs cialis [url=https://cciialiss.com/]cialis online[/url] problems with cialis

Cissr

13th, Nov, 20

USA
effective cialis dose [url=https://cciialiss.com/]cialis 20mg[/url] cialis levitra cialis

Cissr

13th, Nov, 20

USA
tadalafil walmart [url=https://cciialiss.com/#]www cciialiss[/url] does generic cialis exist

Cciialiss

13th, Nov, 20

Brand
buy inexpensive cialis [url=https://cciialiss.com/]buy cialis brand[/url] new use cialis

Cciialiss

13th, Nov, 20

USA
cialis de 50mg [url=https://cciialiss.com/]buy cialis overnight[/url] online cialis legal

Cciialiss

13th, Nov, 20

Brand
buy cialis in usa [url=https://cciialiss.com/#]cciialiss com[/url] best online pharmacies cialis

Cciialiss

13th, Nov, 20

Generic
daily cialis benefits [url=https://cciialiss.com/]cialis pills[/url] expiration of cialis

Cciialiss

13th, Nov, 20

USA
tadalafil liquid [url=https://cciialiss.com/]cialis pills[/url] female cialis effects

Cciialiss

13th, Nov, 20

USA
cialis merida [url=https://cciialiss.com/]generic cialis buy[/url] yellow cialis pill

Life Experience Degrees

13th, Nov, 20

I’m extremely inspired together with your writing skills and also with the structure in your blog. Is this a paid subject matter or did you modify it your self? Either way stay up the nice high quality writing, it is rare to see a great weblog like this one today..

Cciialiss

14th, Nov, 20

USA
cialis what is it [url=https://cciialiss.com/]buy cialis[/url] buy cialis drugstore

Cciialiss

14th, Nov, 20

Brand
cipla cialis review [url=https://cciialiss.com/]buy cialis[/url] do i need cialis

Cciialiss

14th, Nov, 20

USA
prise cialis 5 mg [url=https://cciialiss.com/]buy cialis 40 mg[/url] cialis color of pill

Cciialiss

14th, Nov, 20

Brand
buy cialis no prescription [url=https://cciialiss.com/]buy cialis usa[/url] cialis price 5 mg

Cciialiss

14th, Nov, 20

Brand
cialis once day online [url=https://cciialiss.com/]cialis miami[/url] makers of generic cialis

Cciialiss

15th, Nov, 20

Brand
cost for cialis daily [url=https://cciialiss.com/]buy cialis in usa[/url] tadalafil tablets side effects

Hubertflili

15th, Nov, 20

ed treatment drugs buy ed pills online ed problems treatment [url=https://canadaedwp.com/#]canadian drugstore online[/url] levitra without a doctor prescription

Cciialiss

15th, Nov, 20

USA
brand cialis 5 mg [url=https://cciialiss.com/]cciialisscom[/url] best prices generic cialis

Cciialiss

15th, Nov, 20

USA
cialis rebate [url=https://cciialiss.com/]5mg cialis[/url] what is cialis levitra

Cciialiss

15th, Nov, 20

Generic
cialis effects healthy men [url=https://cciialiss.com/]buy cialis in usa[/url] compare generic cialis prices

Cciialiss

15th, Nov, 20

USA
proper dose of cialis [url=https://cciialiss.com/]tadalafil cialis[/url] maximum dose for cialis

Cciialiss

15th, Nov, 20

USA
cialis brand [url=https://cciialiss.com/]best generic cialis[/url] cialis online uk pharmacy

Cciialiss

15th, Nov, 20

Brand
sildenafil tadalafil [url=https://cciialiss.com/]generic cialis[/url] cialis v levitra

Cciialiss

16th, Nov, 20

Brand
order cialis net [url=https://cciialiss.com/]buy cialis overnight[/url] tadalafil buy online

Cciialiss

16th, Nov, 20

USA
long does cialis last [url=https://cciialiss.com/]5mg cialis[/url] difference levitra et cialis

Cciialiss

16th, Nov, 20

Generic
cialis effects in men [url=https://cciialiss.com/]best generic cialis[/url] cialis more effective

Cciialiss

16th, Nov, 20

Generic
cialis daily vs 36 [url=https://cciialiss.com/]buy cialis brand[/url] cialis color of pill

Cciialiss

16th, Nov, 20

Generic
cialis in men [url=https://cciialiss.com/#]buy online[/url] cialis 36 hour daily

Cciialiss

16th, Nov, 20

Generic
cialis questions [url=https://cciialiss.com/]cialis without prescriptions[/url] cialis medicine used

ccialisny

17th, Nov, 20

cialis lasts days [url=https://ccialisny.com/]how to order cialis[/url] cialis for erectile dysfunction

ccialisny

17th, Nov, 20

cialis erectile dysfunction [url=https://ccialisny.com/]order cialis online canada[/url] effects prolonged use cialis

ccialisny

17th, Nov, 20

review of generic cialis [url=https://ccialisny.com/]order cialis online overnight[/url] difference levitra et cialis

ccialisny

18th, Nov, 20

cialis price walgreens [url=https://ccialisny.com/]ordering cialis online illegal[/url] husband cialis

ccialisny

18th, Nov, 20

effect cialis healthy male [url=https://ccialisny.com/]order cheap cialis online[/url] cialis without prescription overnight

ccialisny

18th, Nov, 20

cialis online overnight delivery [url=https://ccialisny.com/]order cheap cialis 20mg[/url] long does cialis expire

llevitraaa

19th, Nov, 20

acquistare levitra con postepay [url=https://llevitraa.com/]levitra buy online[/url] levitra aspirin interaction

llevitraaa

19th, Nov, 20

levitra 20 mg prospect [url=https://llevitraa.com/]levitra buy cheap[/url] levitra working time

llevitraaa

19th, Nov, 20

buy levitra in england [url=https://llevitraa.com/]levitra buy generic[/url] levitra for sale online

llevitraaa

20th, Nov, 20

mix levitra viagra [url=https://llevitraa.com/]levitra wholesale no prescription[/url] que es la pastilla levitra y para que sirve

llevitraaa

20th, Nov, 20

sildenafil vs levitra [url=https://llevitraa.com/]generic levitra buy india[/url] levitra bula pdf

llevitraaa

20th, Nov, 20

difference entre le levitra et le cialis [url=https://llevitraa.com/]generic levitra[/url] levitra ahumada

llevitraaa

20th, Nov, 20

bula do levitra 20 mg [url=https://llevitraa.com/]https://llevitraa.com[/url] levitra sugtablett pris

llevitraaa

20th, Nov, 20

levitra 24 hours [url=https://llevitraa.com/]generic levitra for sale[/url] levitra orodispersibile scheda tecnica

llevitraaa

20th, Nov, 20

levitra e pressione alta [url=https://llevitraa.com/]generic levitra buy online[/url] cialis vs viagra vs levitra review

llevitraaa

21st, Nov, 20

kas geriau viagra cialis or levitra [url=https://llevitraa.com/]levitra buy online cheap[/url] does levitra have less side effects than viagra

llevitraaa

21st, Nov, 20

levitra och alkohol [url=https://llevitraa.com/]levitra buy india[/url] levitra spermien

llevitraaa

21st, Nov, 20

levitra roma [url=https://llevitraa.com/]levitra 40 mg sale[/url] acquistare levitra con paypal

fixcialel

24th, Nov, 20

tadalafil liquid [url=https://cialisfix.com/]order cialis online pharmacy[/url] cialis review women

fixcialel

24th, Nov, 20

natural equivalent cialis [url=https://cialisfix.com/]order generic cialis[/url] cialis pharmaceutical name

fixcialel

25th, Nov, 20

cialis 5mg daily price [url=https://cialisfix.com/]does lisinopril interact with cialis[/url] price of everyday cialis

fixcialel

25th, Nov, 20

cialis indian brands [url=https://cialisfix.com/]order cialis uk[/url] does cialis really do

fixcialel

25th, Nov, 20

cialis 20mg side effects [url=https://cialisfix.com/]cialis professional wikipedia[/url] generic cialis good

fixcialel

26th, Nov, 20

does cialis does [url=https://cialisfix.com/]36 hour pill cialis[/url] cialis dallas

ciialel

28th, Nov, 20

does caremark cover cialis [url=https://cciialiis.com/]how use cialis[/url] cialis no rx

Michaelstite

28th, Nov, 20

difference between alprazolam and xanax
xanax for dogs
why cant i user goodrx in california for xanax
[url=http://winxanax.com/]xanax (alprazolam)[/url]
xanax for dementia

ciialel

28th, Nov, 20

cialis daily use coupons [url=https://cciialiis.com/]mail order and cialis[/url] cialis 5 mg n1

ciialel

28th, Nov, 20

effet cialis generique [url=https://cciialiis.com/]order cialis black online[/url] best prices online cialis

ciialel

29th, Nov, 20

prostatitis erectile dysfunction cialis [url=https://cciialiis.com/]do doctors prescribe cialis[/url] cialis melbourne

ciialel

29th, Nov, 20

benefits using cialis [url=https://cciialiis.com/]order cialis uk[/url] cialis in phoenix

ciialel

29th, Nov, 20

least expensive cialis [url=https://cciialiis.com/]cialis ordering australia[/url] cialis ireland

Cciialiss

29th, Nov, 20

Generic
manufacturer of cialis [url=https://cciialiss.com/]order cialis canada[/url] make your own cialis

Cciialiss

29th, Nov, 20

Generic
tadalafil india [url=https://cciialiss.com/]order cialis no prescription[/url] cialis cheap prices

Cciialiss

30th, Nov, 20

USA
using half cialis [url=https://cciialiss.com/]order generic cialis[/url] buy cialis in ontario

Cciialiss

30th, Nov, 20

Brand
tadalafil tablets from india [url=https://cciialiss.com/]order cialis no prescription[/url] cialis half dose

Cciialiss

30th, Nov, 20

USA
whats highest dose cialis [url=https://cciialiss.com/]order cialis brand[/url] cialis daily 5 mg

Cciialiss

30th, Nov, 20

USA
pharmacie online cialis [url=https://cciialiss.com/]cialis mail order usa[/url] monthly cost of cialis

Cciialiss

01st, Dec, 20

Generic
cialis price without insurance [url=https://cciialiss.com/]order cialis miami[/url] lowest prices on cialis

Cciialiss

01st, Dec, 20

Brand
liquid cialis dosing [url=https://cciialiss.com/]order cialis miami[/url] generic forms cialis

Cciialiss

01st, Dec, 20

USA
cialis pharmacy rx one [url=https://cciialiss.com/]order cialis with dapoxtine[/url] buy real generic cialis

llevitraaa

02nd, Dec, 20

cialis o levitra cual es mejor [url=https://llevitraa.com/]generic levitra online pharmacy[/url] levitra contra viagra

llevitraaa

02nd, Dec, 20

levitra preise apotheke [url=https://llevitraa.com/]drug levitra sale[/url] foods to avoid when taking levitra

Leave a Comment

To preserve code added to a comment you can wrap your code in short tags
by using [square brackets]:

  1. PHP use - [php] <?php code here ?> [/php]
  2. CSS use - [css] #code-here {} [/css]
  3. HTML use - [html] <div> code here </div> [/html]
  4. JS use - [js] $(".codeHere") [/js]