How to override a function in the wp_includes folder(blocks/search.php)

215 views Asked by At

I'm creating a WordPress theme and I want to change the HTML structure of the search widget block so as have some level of control. I was able to trace the block to a core WordPress file which has a function that handles the HTML structure for the search form: https://github.com/WordPress/WordPress/blob/master/wp-includes/blocks/search.php#L15

How do I override this function from my functions.php in my theme so I can generate a different HTML structure for the search widget block?

Thanks in advance :)

0

There are 0 answers