query - order one custom post type by modified time of another post type

i have post type name series and another name episodes in the homepage i show the series but rank them based on the one

i have post type name series and another name episodes in the homepage i show the series but rank them based on the one that has an episode added to it by time

this is the original code which is only showing by updated for series

    <?php 
        $wpquery = new WP_Query(array(
                "post_type"  => "series",
                "showposts"     => $lm,
                "ignore_sticky_posts" => 1,
                "no_found_rows"  => true,
                "update_post_term_cache" => false,
                "update_post_meta_cache" => false,
                "cache_results" => false,
                "orderby" => "modified"
            )); while($wpquery->have_posts()) : $wpquery->the_post();
            get_template_part('series');
        endwhile; ?>

i tried this

    <?php 
        $wpquery = new WP_Query(array(
                "post_type"  => "series",
                "showposts"     => $lm,
                "ignore_sticky_posts" => 1,
                "no_found_rows"  => true,
                "update_post_term_cache" => false,
                "update_post_meta_cache" => false,
                "cache_results" => false,
                'orderby' => array(
                        "post_type" => 'epsiode',   // taxonomy name
                        "orderby" => "modified",
                )
            )); while($wpquery->have_posts()) : $wpquery->the_post();
            get_template_part('series');
        endwhile; ?>

but did not work please help

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744621655a4584383.html

相关推荐

  • query - order one custom post type by modified time of another post type

    i have post type name series and another name episodes in the homepage i show the series but rank them based on the one

    1天前
    60

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信