Archived topic
Weird character inside navigation
8 replies · Started by An Nguyen on October 14, 2019
Hi,
I saw a weird character in generatepress html mark-up (value=""). How can we fix it?
`<form method="get" class="search-form navigation-search" action="https:/...">
<input placeholder="Search ..." type="search" class="search-field" value="" name="s" title="Search">
<input type="submit" class="search-button" value="">
</form>`
Thanks
Hi there,
Are you using any custom function to create that navigation search popup effect?
It shouldn't be like that by default.
Hi Leo,
I used Tom's php code as below only for using popup-search. Even though I turn this function off, this character is still there.
add_filter( 'generate_navigation_search_output', function() {
printf(
'<form method="get" class="search-form navigation-search" action="%1$s">
<input placeholder="Search ..." type="search" class="search-field" value="%2$s" name="s" title="%3$s" />
<input type="submit" class="search-button" value="">
</form>',
esc_url( home_url( '/' ) ),
esc_attr( get_search_query() ),
esc_attr_x( 'Search', 'label', 'generatepress' )
);
} );
I can see the value symbol in the code above.
Can you try clearing any caching plugins or server cache?
There must be a custom function that's adding it.
I did clear caching.
Hmm can't think of any other reason so we'd need to go through some debugging steps.
Can you first disable all your custom functions? If you are using a child, then you can try enabling the parent theme to test.
I did deactivate all functions on snippet. I didn't use a child.
Yea, that symbol should be something else - the forums convert the actual character to the square.
Try replacing the square with the value here: https://gist.github.com/generatepress/565683b10cca65050d7fb3a006efbc29
I did but it's still the same.
Thanks Tom.