<?php
    
function my_posts_orderby$order_by ) {
        
// Order by fry views meta, desc
        
$order_by "fry_views DESC";
        return 
$order_by;
    }

    function 
my_posts_fields$sql ) {
        
$sql .= ', wp_postmeta.meta_value+0 AS fry_views ';
        return 
$sql;
    }

    
$args = array(
        
'cat' => '+' $media_cat->term_id,
        
'showposts' => 3
        
'meta_key' => 'fry-views'
    
);
    
// Add some filters, which will utilise the functions above to amend the DB query
    
add_filter'posts_orderby''my_posts_orderby' );
    
add_filter'posts_fields''my_posts_fields' );

    
$r = new WP_Query$args );
    if (
$r->have_posts()) :
    
?>
<ul>
    <?php  while ($r->have_posts()) : $r->the_post(); ?>
        <?php global $more$more false// Ensure we only show the text before the more tag. ?>
        <li <?php post_class() ?> id="post-<?php the_ID(); ?>">

            <h3 class="article_title">
                <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
            </h3>
            
            <span class="article_date text_serif"><?php the_time() ?></span>

            <!-- Other post stuff goes here -->
            
        </li>
    <?php endwhile; endif; ?>
</ul>
<?php

    wp_reset_query
();  // Restore global post data stomped by the_post().
    
    // Important to remember to remove these filters
    
remove_filter'posts_orderby''my_posts_orderby' );
    
remove_filter'posts_fields''my_posts_fields' );
    
?>