[Resolved] How can I add class to search bar !?

Home Forums Support [Resolved] How can I add class to search bar !?

Home Forums Support How can I add class to search bar !?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1679856
    Stephen

    Hi I brought a navigation search bar to the primary menu via Customize > Layout > Primary Navigation..
    Now it has a background color which I want to get rid of, could anyone teach me how to add class to this navigation search ?

    In addition, for this navigation search feature, May I know its search range? one navigation title? or all content from the site?

    Reference link https://www.awesomescreenshot.com/video/2931843?key=4c7482a723538f66a1af19e3c21d22c2

    Thank you,

    Chris

    #1679950
    David
    Staff
    Customer Support

    Hi there,

    the Navigation Search item has its own CSS class of search-item – heres some CSS to remove the background hover color from it and optionally add a different color to the icon:

    .main-navigation .main-nav ul li.search-item:hover>a {
      background-color: transparent; /* Remvoe background color on hover */
      color: #f00; /* Optional - Change icon color onn hover */
    }

    The default search behaviour is the standard WP Search function – it will do a basic search for any Title. Content or Term….

    #1681288
    Stephen

    Thanks David! I am the fan of GP!!

    #1681468
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.