Support » Themes and Templates » Ryu » [Resolved] How to eliminate search icon
2 years, 10 months ago
I’m trying to use RYU as a single page theme. I’ve eliminated the menus, but how do I get rid of the search icon/feature?
Hi there, to remove the search icon at the top, you’ll need to first create a child theme, so your changes won’t be overwritten when you update the theme. If you’re new to child themes, you can explore these guides:
Make a copy of header.php from Ryu and place it in your child theme folder.
Remove lines 196-200 – note that your line numbers may be different if you previously edited the file:
<a href="#" class="genericon" title="<?php esc_attr_e( 'Search', 'ryu' ); ?>">
<span class="screen-reader-text"><?php _e( 'Search', 'ryu' ); ?></span>
I tested this on my end and it worked. Let me know how it goes!
Thanks Kathryn. I’d prefer a solution using functions.php or CSS but I may try that if I can find time to get up to speed on child themes.
You can always try hiding the element by adding this:
Don’t edit the theme’s style.css directly, otherwise your changes will be overwritten when the theme is updated.
An easy way to add custom CSS is to install the Jetpack plugin and activate the Custom CSS module. You could also install a standalone custom CSS plugin.
Thanks! I will give it a try and report back.
That did it. Thank you so much!