按另一种类型的日期订购(Wordpress)

时间:2017-04-09 14:42:44

标签: php html wordpress

if errorlevel n

我想通过与第一个post_type相关的post_type订购post_date我试过下面的代码:

$popularpost = new WP_Query(
array(
'post_type' => 'drama',
'showposts' => 10,
'orderby' => 'meta_value_datetime' )
);
while ( $popularpost->have_posts() ) : $popularpost->the_post(); ?>
<?php $listseri = new WP_Query( array( 'showposts' => '3' ,'post_type' =>
'series' ,'meta_key' => 'smoker_episodebaru', 'meta_value' => 'true',
'orderby' => 'smoker_episodebaru','order' => 'DESC', 'meta_key' =>
'smoke_seri', 'meta_value' => $valuez) ); ?>
<?php if ( $listseri->have_posts() ) : while($listseri->have_posts())
 :$listseri->the_post(); ?>
<?php $meta = get_post_meta( get_the_ID(), 'smoke_seri', true ); if 
($meta) : ?><?php echo get_the_title($meta); ?><?php else :?>
<?php endwhile; ?>
<?php else : ?><?php endif; ?>
<?php endwhile; ?>
<?php wp_reset_query(); ?>

但它不起作用 This The Image I Want to make 这篇文章是按剧集post_date,

订购的

0 个答案:

没有答案