Genesis – Customize search form

I’m not sure why you’re getting a 500 error. Likely because you’re trying to use a function before it’s been defined. But I think you’re going about the problem the wrong way. Genesis does provide a filter before returning the search form. Why not just add a filter to the genesis_search_form hook? You can add … Read more

add_filter the_content str_replace after shortcode

You can change the priority of actions and filters, it’s the third argument of add_filter (and add_action) and it defaults to 10. So change it to a high number and have your filter fire way after the shortcodes and other stuff are inserted. <?php add_filter(‘the_content’, ‘disable_autocomplete’, 99); function disable_autocomplete( $content ) { return str_replace(‘<form’, ‘<form … Read more

How to insert a span inside a search form?

If we look at the source code of get_search_form(), notice that before the form gets rendered, the search_form_format filter hook gets fired. We can use that to add another filter attached to get_search_form where the callback is dependent upon the format. add_filter( ‘search_form_format’, ‘wpse_259716_search_form_format’, 99, 1 ); function wpse_259716_search_form_format( $format ) { if( in_array( $format, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)