[SOLVED] How to sort custom search results?
I copied index.php to search.php as described here http://forum.bytesforall.com/showthread.php?t=610 and it works fine. But I am left confused with two questions:
1. how to sort the search results (by a custom field)? 2. how to specify/override the number of search results returned? the contents of my search.php is basically: PHP Code:
|
Without seeing the code you used, it's hard to tell.
You should look up what ever function you are using and read about the options (http://codex.wordpress.org/Function_Reference/) to see if there is an 'order by' option |
That's what confuses me too, I don't know the function being executed for a search. I activated the Search box in Atahualpa theme options and that's what I use to search. the only customization I have done is copy index.php and rename it to search.php, but I'm using the default search box from atahualpa theme options.
|
After typing something in the search box, the URL becomes: www.mysite.com/?s=test Does that look familiar to anyone? Like JD says, if I could figure out which function is being called I might be able to customize it.
|
|
hmmm... well. i guess that counts as an answer, albeit a cryptic one. took a while to piece this together but finally here is the solution in case anyone else gets stuck on this.
copy index.php to a new file named search.php in the atahualpa theme directory. edit it as below: PHP Code:
|
All times are GMT -6. The time now is 03:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.