Hi all,
Instead of showing the error message IF there are no search results to display
<?php _e('Sorry, no results were found.', 'sage'); ?>
I would like to display a “no-results” template without sidebar…
I have edited the search.php file in the theme’s root directory to make it grab a custom template:
<?php if (!have_posts()) : ?> <?php get_template_part('templates/content', 'search-noresults'); ?> <?php endif; ?>
Could you please tell me how I can remove the sidebar from this template?
As the template resides in the /templates directory instead of the root directory, I’m afraid I cant use the is_page_template conditional tag in setup.php. Is there any other condtional tag I can use or how could this be done?
Thanks in advance!
Regards,
Steven