WPIntell

Source evidence

Remove Text Before Input Box

Bop Search Box Item Type For Nav Menus · support · 2017-10-26T00:29:00+00:00

complaintsentiment
mediumseverity
0.86relevance
7replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 29 rows with source links

24.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

22 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
and_e30 unresolved
I know this is covered in the FAQ but I appoligize for being a complete n00b. Where does the below code go? add_filter( ‘bop_nav_search_screen_reader_text’, function( $text, $item, $depth, $args ){ $text = ”; //for nothing $text = __( ‘<span class=”screen-reader-text”>The text you want</span>’, ‘myslug’ ); //to change – the __() is for theme translation return $text; }, 10, 4 ); I added it to my functions.php file and got a major error and had to delete the code. Hi and_e30, functions.php is the right place. Your issue comes on the line: $text = ”; //for nothing You have used a double quotation mark rather than two single quotation marks (i.e., " rather than '' ). That said, you may as well simply delete this line as it does nothing of worth; it is simply there to demonstrate that the old $text value was being overwritten. Hope this helps. Cheers, Joe P.S., it’s also worth noting that myslug should be changed to your theme’s text domain – usually the same name as the theme’s folder. This worked great, thank you so much. however now I have a new issue. the search box is aligning high in my menu bar when viewed on the desktop (the mobile version runs fine as the format changes. Is there a way to vertical align the box so it is inline with the other menu buttons? my website is http://www.bimmertips.com li.bop-nav-search { padding: 20px 0; } unfortunately that did not work adding it to my functions.php file. It gave me an error and could not view the website at all. Hi, It’s css. It’s meant to go in style.css at the bottom. Cheers, Joe Thanks for the clarification Joe, it seemed to have work on Chrome but not on Safari. Hi, I’m afraid that’s something you’re going to have to play around with to work out. I don’t have any apple products and therefore can’t test safari (also styling changes are beyond the remit of this plugin and are naturally going to be custom from theme to theme and site to site). Cheers, Joe P.S., It’s also perfectly understandable to leave safari with aesthetic issues as it has low market share and is truly the worst browser around by a massive margin.

Comments

7 shown
joe_bopper 2017-10-29T13:07:00+00:00

Hi and_e30, functions.php is the right place. Your issue comes on the line: $text = ”; //for nothing You have used a double quotation mark rather than two single quotation marks (i.e., " rather than '' ). That said, you may as well simply delete this line as it does nothing of worth; it is simply there to demonstrate that the old $text value was being overwritten. Hope this helps. Cheers, Joe P.S., it’s also worth noting that myslug should be changed to your theme’s text domain – usually the same name as the theme’s folder.

and_e30 2017-11-11T20:15:00+00:00

This worked great, thank you so much. however now I have a new issue. the search box is aligning high in my menu bar when viewed on the desktop (the mobile version runs fine as the format changes. Is there a way to vertical align the box so it is inline with the other menu buttons? my website is http://www.bimmertips.com

joe_bopper 2017-11-21T12:37:00+00:00

li.bop-nav-search { padding: 20px 0; }

and_e30 2017-11-22T12:19:00+00:00

unfortunately that did not work adding it to my functions.php file. It gave me an error and could not view the website at all.

joe_bopper 2017-11-23T12:18:00+00:00

Hi, It’s css. It’s meant to go in style.css at the bottom. Cheers, Joe

and_e30 2017-11-23T12:34:00+00:00

Thanks for the clarification Joe, it seemed to have work on Chrome but not on Safari.

joe_bopper 2017-11-25T11:29:00+00:00

Hi, I’m afraid that’s something you’re going to have to play around with to work out. I don’t have any apple products and therefore can’t test safari (also styling changes are beyond the remit of this plugin and are naturally going to be custom from theme to theme and site to site). Cheers, Joe P.S., It’s also perfectly understandable to leave safari with aesthetic issues as it has low market share and is truly the worst browser around by a massive margin.