2

How do I change this template code to only return results from the title field of an entry?

The search result page url would look like this: /search-results?q=joe+blogs

{% set query = craft.request.getParam('q') %}
{% set entries = craft.entries.section('not thisSection').search(query).order('score') %}

Thanks for any help.

6

This seems to work:

{% set entries = craft.entries.section('not lakeDetails').search('title:' ~ query).order('score') %}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.