acraig wrote
$showSidebar = $hasSidebar && ($ACT=='show');
I'm assuming I need to somehow set $ACT = 'show'; for the sidebar, but I don't know where or how?
You should rather check for
$ACT == 'search' as well. So,
$showSidebar = $hasSidebar && ($ACT=='show' || $ACT == 'search');
But please bear in mind that that change will be gone when you update the template. So, either make a note of it somewhere or copy the whole template to a new folder before making changes in that new folder.