Home › Forums › Support › Add Search Bar to Page Hero Element This topic has 6 replies, 4 voices, and was last updated 4 years ago by Shreedhan. Viewing 7 posts - 1 through 7 (of 7 total) Author Posts February 3, 2020 at 4:33 pm #1153471 Martin Hi, I tried looking but I couldn’t find this anywhere. I’m trying to add a search bar to my home page hero element. I’d like it to look like this:https://bestofmachinery.com/ Is there an easy way to do this? Thanks! February 3, 2020 at 4:47 pm #1153477 LeoStaff Customer Support Hi there, Try creating a shortcode for the search field using this PHP snippet here: https://generatepress.com/forums/topic/search-field-in-404-page/#post-787184 Adding PHP: https://docs.generatepress.com/article/adding-php/ Then you can add the shortcode [search_form] in the page hero content. Let me know if this helps π February 4, 2020 at 12:43 am #1153703 Martin Thank you, I made a plugin and added the functions into that plugin. Is there a way of reducing the width of the search bar? It currently stretches across the entire width of the hero header? Thanks again. February 4, 2020 at 3:29 am #1153834 DavidStaff Customer Support Hi there, can you share a link to where i can see the search field ? You can edit your original topic and use the Site URL field to share the link privately. March 31, 2020 at 12:26 pm #1221283 Shreedhan I’m trying to do the same thing. I’ve got the search form displaying but just wanted to ask the best way to format this. e.g. remove the search button, change the place holder text, font colour etc. Appreciate your help with this. March 31, 2020 at 1:31 pm #1221358 LeoStaff Customer Support Any chance you can open a new topic and link us to the page in question? Thanks π April 1, 2020 at 1:09 am #1221749 Shreedhan Done π https://generatepress.com/forums/topic/how-to-style-search-bar-shortcode/ Author Posts Viewing 7 posts - 1 through 7 (of 7 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In