Surprise! I figured out how this would happen. ??
Related to that, but while searching for another topic, I came across this page.
There are a lot of codes on the page but I just used this:
<gcse:searchresults-only
queryParameterName="s"
linkTarget="_parent"></gcse:searchresults-only>
Finally, with some edits, I organized the search page as follows:
<?php get_header(); ?>
<script async src="https://cse.google.com/cse.js?cx=ID"></script>
<div class="archive-header search-box">
<?php get_search_form(); ?>
</div>
<gcse:searchresults-only
queryParameterName="s"
linkTarget="_parent"></gcse:searchresults-only>
<?php the_posts_pagination();
get_footer();
Your theme is so perfect that I don’t need to do anything else. But I’m not sure I deleted the correct codes. Do you think there is a problem?
Here is a demo: https://halilsn.com/?s=harry+potter
You can experiment on my site.
But there is a look integrated into the theme on the site where I bought these codes. Here: https://wolkanca.com.tr/?s=google+arama
I don’t know the rest.
One more thing: When I add pure Google CSE code to this theme, it is not fully compatible. Maybe for this reason, there are spaces on the sides and above in the search results on my site.
You are great. ??