• Hello!

    My name is Jake and I am a novice to wordpress. I am trying to code a search bar inside my navigation menu that will be right justified.
    I have read a lot of information regarding how to do this, but for some reason, I have failed.

    Will anyone take the time to view my website and provide me with code I can put in the child theme of my style.css or header.php that will make this happen for me?

    Or any other solution that may be beneficial to my needs?

    Thank you,

    Jake

    https://www.whatwelivefor.com

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Jake,

    In your header.php file you can add <?php get_search_form(); ?> wherever you would like the form to appear in the HTML. The changes you’ll need to make to your style.css file will depend on where you add the search form, what elements, if any, you wrap it in, and how you would like it to appear.

    Thanks,
    Lucas

    Thread Starter JacobHenderson5989

    (@jacobhenderson5989)

    Lucas,

    Thank you so much! This is as much effort towards completing this task as I have gotten.

    Can you please tell me what I would need to do now, that my search bar is inside my nav bar?

    I need it right justified and centered with the menu text.

    https://www.whatwelivefor.com

    Thanks again!!!

    Jake

    Jake,

    Are you able to move the <?php get_search_form(); ?> code to inside <nav id="site-navigation"... ? If so, you should then be able to add the following to your CSS:

    #site-navigation .search-form {
      float: right;
      margin-top: 7px;
    }
    Thread Starter JacobHenderson5989

    (@jacobhenderson5989)

    Lucas, sir,

    You are gentleman and a scholar.

    Thank you for helping me with this issue.

    Love,

    Jake

    https://www.whatwelivefor.com

    My pleasure!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Search Bar in Nav Menu’ is closed to new replies.