这是我正在使用的代码:
//此处显示主要类别
$w=mysql_query("select * from wp_term_relationships where term_taxonomy_id='$xresult[term_id]' "); //
while( $wresult=mysql_fetch_array($w))
{
// at here i want that the list will be shown in alphabetic order
$po=mysql_query("select * from wp_posts where ID='$wresult[object_id]' and post_status='publish' ");
$pod=mysql_fetch_array($po);
$qq=mysql_query("select * from wp_postmeta where post_id='$pod[ID]' and meta_key='phone'");
$q=mysql_fetch_array($qq);
?>
<li>
<a class="col-xs-6" href="<?php echo home_url();?>/store/<?php echo $pod['post_name']; ?>/"><p><?php echo $pod['post_title']; ?></p></a>
<span class="col-xs-6"><?php echo $q['meta_value'];?></span>
请帮帮我。 提前谢谢。