我使用Custom Post Type UI (CPT-UI) to create Portfolio post
我创建新文件 portfolio.php
我用这段代码来显示类别列表
<?php
//Display a list of all the categories of custom post types
$terms = get_terms(
array(
'taxonomy' => 'portfolio_categories', // Custom Post Type Taxonomy Slug
'hide_empty' => false,
'order' => 'asc'
)
);
//List of all categories of custom post types
echo '<ul>';
foreach ($terms as $term) {
//echo '<li><a href="'.get_term_link($term).'">'.$term->name.'</a></li>';
echo '<li><a href="javascript:void(0);">'.$term->name.'<i aria-hidden="true" class="fas fa-chevron-down"></i></a></li>';
}
echo '</ul>';
?>type here
但是我无法显示每个类别的每个帖子的内容
所以我需要你的帮助
每个投资组合的详细信息页面将使用 elementor 创建