Thank you very much for your reply. This seems to be simpler and I will try this.

However, while searching for a solution for this problem, I found a css code to try removing search box. The code is as follows
`.registration #search-form, .activation #search-form { display: none; }`
Then, I used
`.page-id 20 #seach-form { display: none; }`
Removed it from all the pages, except the one I wanted to keep it on.
I figured out using ‘page’ (.page #search-form { display: none; }) removes the box from every page but not blog posts and bp pages (like profile, activity etc.)

Can you help me know how to define ‘blog posts’ and ‘buddypress pages’ to remove the search box from those pages too. I want to say something like following:

@mairaj know that if user disables styles in browser, they will see the search form. But should you still want to proceed with your method, these two lines should do it via CSS

`/* Hide search form in ALL pages */
#search-form { display: none; }

/* Then show search form on this page only (change page ID to your installation’s page ID) */
body.page-id-25 #search-form { display: block; }`
You might have to add some width or float after display block depending on how you’ve styled the child theme.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Hiding header search box other than specific page’ is closed to new replies.