Customizing the searchform.php


I was able to customize my search form in my old theme to echo to my created search page - Google CSE. For whatever reason, anything I do to the searchform.php file has no effect on the search itself.

I added a search modal on the header and it always points to /?s even though I have added action="<?php echo esc_url( '/_search' ); ?>"> along with some other code via the searchform.php on my child theme.

Is there a different location for the search form? I assume the search modal along with any search button is customizable through the same file in the theme?

Best regards

Hello Joshua,

Are you using any other plugin that may have a search feature? To better assist you with your issue, kindly provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Hello Joshua,

The given credentials have limited privileges.

You cannot modify the search modal element. Any of the search elements will display the Search Results page.

Note: Please be advised that custom coding is beyond the scope of our support. We only cover getting your site set up, bug fixes, and minor cosmetic changes. Any additional feature to an element or particular WordPress function that needs custom coding shall be directed to 3rd party developers if you are not familiar with coding.

Thank you for your understanding.

So what you are saying is the searchform.php file has no effect on the search modal but it does have an effect on every other search element?

If I chose another search element it would point to my custom-made search page?

I set it for admin privileges. If you need another one to take another look let me know.

Thank you

Something went wrong. I had to change it back to Administrator. You can retry if you’d like or if you need to.

Hello Joshua,

Please understand that the searchform.php is used as the template of the search input for the default WordPress search box. Any modifications to the searchform.php do not and will not affect any of the search elements like the search inline, search modal and search dropdown.

If you use the classic search element then the searchform.php modifications will take effect.

Hope this makes sense.

Thank you for that information. It makes sense now.

How can I customize those search elements? As in, where is the file for those search elements?

Also, how do I get ahold of that classic search element just as a backup if there is something wrong with me being able to edit the file for the three search elements?

Thank you

Hello Joshua,

The classic search element can only be added within the content or global block. You cannot add it in your header builder directly. You can create a global block and use the global block shortcode inside a content area modal or in one of your header containers.

Regretfully you cannot and we do not recommend editing any of the builder elements. It is best that you create your own search element instead. Perhaps this documentation can help you to get started with:

Be advised the custom coding is beyond the scope of our support. You may need to do the coding yourself or ask for further assistance from 3rd party developers.

Best Regards.

1 Like

Makes sense, thank you. It was pretty easy to set up! Love how customizable Themeco is.

For some reason, the Content Area Modal is not rendering. It states, “This element failed to render. Additional error information may be found in your browser’s developer tools.” I checked the developer tools and took a screenshot - I will also give you some new credentials just in case you would need to log in again.

I thought it was a missing plugin so I installed the Uber Menu through Validation and it looked like the error changed in the developer tools.

Not sure exactly as to exactly what to do.

Thanks and regards

Also, when I save, it functions properly on the front end. I just cannot see any edits I make so I have to save then check the changes on the front end.

Hi Joshua,

Regarding the Content Area Modal is not rendering. Please be advised that this is a known conflict between the latest release and WordPress 5.7. Our developers have already been informed about this issue and currently fixing it. A patch release will be rolling out anytime soon.

Please bear with us.

1 Like

Thank you for your help!

Hi Joshua,

You’re welcome and it’s our pleasure to help you. If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.