/ Published in: PHP
                    
                                        
Put this before the loop in archive.php to have posts in the archive for category '26' sorted by custom field 'date'. 
Assign sortable values like '090501' or '2009-05-01' to those fields when editing posts and your Upcoming Events will be sorted by the future date at which they will take place.
                Assign sortable values like '090501' or '2009-05-01' to those fields when editing posts and your Upcoming Events will be sorted by the future date at which they will take place.
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<?php if (is_category('26')) { $posts = query_posts($query_string. '&orderby=meta_value&meta_key=date&order=DESC' ); } ?>
Comments
 Subscribe to comments
                    Subscribe to comments
                
                