• I’ve seem to hit a wall with this one. I’m trying to display the ‘meta_key’ => ‘lastname’ only that begin with the letter “A” in a custom archive template.

    So far I can filtered the items to display posts by lastname in ASC order. Here is what I got:

    <?php global $wp_query;
    $args = array_merge( $wp_query->query, array( 'meta_key' => 'lastname','orderby' => 'meta_value', 'order' => 'ASC', 'category_name' => 'Permanent Collection' ) );
    query_posts( $args ); ?>

    Does anyone wanna take a crack at it. Any help would be appreciated.

    Thanks in advance.

  • The topic ‘Display Posts by meta_key letter A’ is closed to new replies.