I have code

    {% set tags = entry.q_tags %}
    {% set entries = craft.entries.relatedTo(tags).order('score').find() %}
    {% for item in entries %}
      {% if item.id != entry.id %}
      {% endif %}
    {% endfor %}

But how to do that similar entries displayed order with the greatest coincidence tags? Thank you. Sorry for my english

1 Answer 1


Please correct me if I am making an incorrect assumption. From your example, it looks like you're passing multiple tags to the search query, and by greatest coincidence you mean that you want the Entries that have the most matching tags that are part of your search, to appear higher in the results than Entries that may just have a single matching tag.

I don't believe this is possible without an additional plugin that helps with modifying the scoring and order of the search results.

  • Yes, I mean sort where the greatest tag match, a great pity that it is impossible Aug 31, 2015 at 16:25

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.