However, my other site doesn’t allow me to do that.
I’ve searched for any basic or plugin settings that would make a difference and haven’t found any.
Does anyone have any advice or suggest a plugin that might let me sort by date?
Thank you!
]]>$posts = get_posts(array(
'post_type' => 'post',
'posts_per_page' => -1,
'meta_key' => 'votes',
'orderby' => 'meta_value',
'order' => 'DESC'
));
]]>I’m working with a site for a magazine and they publish all their articles from their issues on the site, and we’re using a Custom Taxonomy to categorize the articles into the different issues. I’ve created a specific template to show the Custom Taxonomy (‘taxonomy.php’).
The main feed of articles on the site is sorted from the latest to the oldest (the latest article appears first on the site). My problem now is that I want to sort the articles on the issue-pages (that are using taxonomy.php) in reverse order compared to the main feed (from the oldest to the latest).
Can anybody help me with that?
For the moment my code looks like this, but this results in the issue-pages showing all of the posts of the site (although ordered in the way I want):
$cat_posts = new WP_Query($query_string."&orderby=date&order=ASC");
if ( $cat_posts->have_posts() ) {
while ( $cat_posts->have_posts() ) : $cat_posts->the_post();
...
Thanks in advance!
]]>query_posts( $query_string . '&order=DESC' );
in the category.php, but there is no category.php in the Great! theme.The line
if ($_POST['select'] == 'prijs') { $order = "&order=ASC&orderby=meta_value_num"; }
needs to be changed to
if ($_POST['select'] == 'prijs') { $order = "&order=ASC&meta_key=yourmetakey&orderby=meta_value"; }
if the custom field you want to sort by is named “yourmetakey”.
]]>as title says I’m looking for a plugin that will enable me to filter what a user sees on the front page by drop-downs. I do have an example but its an adult site so obviously won’t link it here. It would be like some bar below the logo on the front page and people can click it.
So the user can click a button and display different posts on the front page.
So if we were talking about potatoes the user could sort by type of potato, weight, color etc.
I guess what would this be called, filter posts by type? sort posts by category?
Thanks in advance!
]]>