Can I set the default order of search results?

There is a setting for default ordering for images and albums, but not for search results. I think it can be done in the template with setOption() but I don't know how. I just added a new set of images, but now results from last year come before the new additions, like this: http://www.jacktummers.nl/collectie/page/search/?words=paardenmarkt+hedel

Comments

  • search results are ordered by "relevance" (the number of times the item is found) no default, but you can call the function passing a sotr order.
  • Do I add this to the printSearchForm function? Perhaps you can tell me how.
  • acrylian Administrator, Developer
    No, on the loops on your theme's search.php (next_image/next_album).
  • Ok, but I can't find what the options could be. I can find the $sortorder everywhere, but what values can it have???

    I now have this:

    while (next_image(false, id, desc))
  • acrylian Administrator, Developer
    You should be able to use all those that are listed on the backend options for images/albums sorting. Of course you also need to enclonse strings parameters in quotes.
Sign In or Register to comment.