I need to be able to change the way Portfolio items are displayed on the Portfolio overview page. By default, they appear in reverse chronology, based on the post date stamp. However, I would like to be able to order the posts by the value of a custom field. I have had some success by modifying line 12 of loop-portfolio.php as follows:
if(isset($avia_config['new_query'])) { query_posts($avia_config['new_query']); }
changed to:
if(isset($avia_config['new_query'])) { query_posts ( '&post_type=portfolio&meta_key=show_date&orderby=meta_value&order=ASC'); }
However, by removing $avia_config['new_query'], I am no longer able to choose which categories are displayed; regardless of what I set in the template builder, posts from all categories are output.
Can anyone offer a solution?
Many thanks!














