开发者

Query post using multiple custom field

I am using this code for showing post from "meta_key=Date" and it is working fine!

Now i need to include another "meta_key=Top" using numeric meta_value into my query for showing post and ordered by this meta_value but i can't figure out the function.

Can anyone help me please.

Thanks in advance, Shafin

<?php 
   $daily_date = get_option('cus_daily_date');
   query_posts("category_name=sports&meta_key=Date&orderby=meta_value&order=asc&met开发者_JAVA百科a_value=$daily_date"); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>


Look here for details http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜