你会想在你的主题category.php
文件:
<?php
// fetch the categories with the parent being the current cat
$sub_cats = get_terms(\'category\', array(
\'parent\' => get_queried_object_id()
));
if(!is_wp_error($sub_cats) && $sub_cats)
{
foreach($sub_cats as $cat)
{
// Create your grid here, this is just an example
printf(
\'<a href="%s">%s</a>\',
get_term_link($cat, $cat->taxonomy),
$cat->name
);
}
}