Hi there,
I am in need of help, I would like to know how to create a link that when clicked it will change the order a list is displayed.
Specifically in wordpress when using a codex to display posts.
How would I create a link or dropmenu that can sort the post in different way.
So for example default could be:
<?php
{
query_posts("cat=2&orderby=title&order=ASC");
}
?>
Then user selects "sort by date" link and the page loads this php:
<?php
{
query_posts("cat=2&orderby=date&order=ASC");
}
?>
P.s.
If someone might know also (but I can ask this in wordpress forums) how can I display the "date, author, comment, etc" in a table form when the query creates the post list (so instead of showing just excerpt & title - it shows 1)title 2)date 3)author 4) amount of comments) I assume I use get_posts instead.