A small bump (hope no-one will mind); I’ll keep this open for another week. Hurry! 😉
It might be worth posting in the “Plugins and Hacks” section of the WordPress forums as well 🙂
On an additional note, a catchier title might be a good idea (I just saw the post in the Plugins/Hacks section) since “I’m receiving plugin suggestions!” could also indicate that you might be looking for plugins rather than offering to develop one.
Kindly take a look at this suggestion: http://wordpress.org/support/topic/192423?replies=1
If such a plugin doesn’t already exist, it would make a hit plugin. 🙂
I need a plugin — or even just the right code! — to sort by custom fields.
Currently I have code on my category page that lets the user sort by title, newest, oldest and I want to add the ability to sort by a custom field of “rating”.
Here is the code I have now. Can you expand it to include custom fields?
<?php
$order = "&orderby=cost&order=DESC";
$s2 = ' selected="selected"';
if ($_POST['select'] == 'title') { $order = "&orderby=title&order=ASC"; $s1 = ' selected="selected"'; $s2 = ''; }
if ($_POST['select'] == 'newest') { $order = "&orderby=cost&order=DESC"; $s2 = ' selected="selected"'; }
if ($_POST['select'] == 'oldest') { $order = "&orderby=cost&order=ASC"; $s3 = ' selected="selected"'; $s2 = ''; }
?>
<form method="post" id="order">
Sort by:
<select name="select" onchange='this.form.submit()'>
<option value="title"<?=$s1?>>Title</option>
<option value="newest"<?=$s2?>>Newest</option>
<option value="oldest"<?=$s3?>>Oldest</option>
</select>
</form>