Title: Oderby TItle
Last modified: December 4, 2018

---

# Oderby TItle

 *  [trixox](https://wordpress.org/support/users/trixox/)
 * (@trixox)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/oderby-title/)
 * Hi!
 * I have build up a page with 500 pdf files and the free relevanssi plugin version.
   If i search the files (for example the search word: MB-007, it shows all MB-XXX
   Files ordered the same way all the time.. (MB-001, MB-006….) If i search MB-350,
   i need to scroll down for ages to find the PDF file.
 * Another problem is that it always shows up a random picture of the page where
   the files are… If my download area for example has a full height header and the
   downloads above it, it also includes a small full height header of the download
   are in the search result…How to exclude that?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/oderby-title/#post-10947655)
 * Relevanssi doesn’t really affect the way your page shows up. Relevanssi will 
   just tell you which page has the keyword, nothing else. Relevanssi has no means
   to reorder the contents of the page.
 * It’s possible to add some Javascript that will scroll the page down to where 
   the keyword is first found, but that’s not a foolproof method: [https://www.relevanssi.com/knowledge-base/scroll-result-page-search-term/](https://www.relevanssi.com/knowledge-base/scroll-result-page-search-term/)
 * What shows up on your search results template has nothing to do with Relevanssi;
   it’s all up to your theme and the search results template it provides. If you
   don’t want images to show up in the search results page, you need to edit the
   template so that no images are shown.
 *  Thread Starter [trixox](https://wordpress.org/support/users/trixox/)
 * (@trixox)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/oderby-title/#post-10955849)
 * Thank you for your fast answer.
 * Very complicated for such a simple task.. Isnt there any other way to do this?
   I mean..if i have 100 files names: mb-xxx and search mb-002…why does it show 
   all mb-xxx files..? Maybe i am doing something wrong? Otherwise:
 * 1) So i just need to add both codes to the functions.php?
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/oderby-title/#post-10956746)
 * Ah, but it is not a simple task! It may seem like a simple task, but it’s not.
 * Relevanssi does not show the files. Relevanssi shows you the page, which has 
   a list of all the names. Relevanssi doesn’t know what the contents mean; all 
   it knows is that user wanted to find posts matching “mb-002”, that one post matches
   it and should thus be returned. Relevanssi doesn’t know that the user wants only
   that part of the page and nothing else, because usually the user wants the whole
   page.
 * If you want the list to only have the names matching the search query, you need
   to edit the page contents on the fly, and that takes it to the complicated territory.
 * No, none of the code in the JavaScript scroll goes to the functions.php; it’s
   best if you put the JS code in a separate file and then add a functions.php function
   that uses wp_enqueue_script() to read it in when necessary.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Oderby TItle’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=3529670)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

## Tags

 * [search order](https://wordpress.org/support/topic-tag/search-order/)

 * 3 replies
 * 2 participants
 * Last reply from: [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/oderby-title/#post-10956746)
 * Status: not resolved