Can anyone explain me how to get the search results from the Google Custom Search, placed in the sidebar, on to the page where the sidebar is?
This is what I tried:
I placed this in my sidebar:
<?php display_search_box(DISPLAY_RESULTS_CUSTOM); ?>
and this in search.php, within the loop:
<?php display_gsc_results(); ?>
This doesn't work, but when I place the 'gsc_results' code just beneath the 'search_box' code in the sidebar, it does work.
I think therefore that it has something to do with how the sidebar and page are connected through WordPress. I'm certainly not an expert, but I thought when I placed the code in search.php it should work.
Can anyone help me?