Skip to content

Instantly share code, notes, and snippets.

@sashtown
Created November 8, 2012 17:36
Show Gist options
  • Save sashtown/4040280 to your computer and use it in GitHub Desktop.
Save sashtown/4040280 to your computer and use it in GitHub Desktop.
Kirby: How to display the search query item and the count of results
<?php if($results): ?>
<h1>
<?php echo $results->pagination->countItems() ?>
<?php if($results->pagination->countItems()=='1'): ?> result
<?php else: ?> results
<?php endif ?>
for <em><?php echo $search->query() ?></em>
</h1>
<?php endif ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment