• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Expanding Search Form in Nav Menu

This code enables you to add a expanding search form in the Navigation menu of any WordPress theme. The code is tested in the Genesis Sample child theme however it will also work in any other WordPress theme as it uses WordPress hook and not a theme specific hook.

Update : If using the latest Genesis Sample theme, use this new tutorial instead.

Here’s the expanding search box in action:

expanding-search-form

The code uses PHP to add the search form to the nav menu and CSS for the effects, No jQuery used.

Code Installation

  1. Add the PHP to the end of your child themes functions file.
  2. Add the CSS to the end of your child themes style.css file before the start of your CSS for Media Queries.

Non Genesis Theme Usage

Simply swap out the .genesis-nav-menu class in the CSS with the main class for your themes nav menu.

Here’s the code for logged in members:

Register for full access

Search

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.