请帮助我这个网站https://desarrollowebtotal.space/yoentrenoencasa/
我使用 touchsize 的 goWatch 主题作为父主题。
我需要的是:
当我单击主页上列出的任何类别(例如瑜伽)时,该站点将导航到包含该分类中创建的所有视频的存档,这不是我想要的行为。
我想要的是该存档返回已发布该类别视频的作者列表,并作为列表嵌套显示与该类别中该作者关联的视频。
是否有可能做到这一点?
// This query brings the videos within the videos_categories taxonomy that match the current slug
$term = get_queried_object();
$loop = new WP_Query( array(
'post_type' => 'video',
'posts_per_page' => 10,
'tax_query' => array( //(array) - use taxonomy parameters (available with Version 3.1).
'relation' => 'AND', //(string) - Possible values are 'AND' or 'OR' and is the equivalent of running a JOIN for each taxonomy
array(
'taxonomy' => 'videos_categories', //(string) - Taxonomy.
'field' => 'slug', //(string) - Select taxonomy term by ('id' or 'slug')
terms' => $term->slug, //(int/string/array) - Taxonomy term(s).
include_children' => true, //(bool) - Whether or not to include children for hierarchical taxonomies. Defaults to true.
'operator' => 'IN' //(string) - Operator to test. Possible values are 'IN', 'NOT IN', 'AND'.
),
),
) );
这是我到目前为止所做的,我不知道如何嵌套视频列表,以便父母是作者,孩子是与该作者相关的视频
//更新1
$argsA = array(
'orderby' => 'name',
'order' => 'ASC',
'number' => null,
'optioncount' => false,
'exclude_admin' => true,
'show_fullname' => false,
'hide_empty' => false,
'echo' => true,
// 'feed' => [empty string],
// 'feed_image' => [empty string],
// 'feed_type' => [empty string],
'style' => 'list',
'html' => true,
);
$authors = wp_list_authors($argsA);
// This query brings the videos within the videos_categories taxonomy that match the current slug
$term = get_queried_object();
精慕HU
aluckdog