代码如下:
<?php
$cat= single_cat_title('', false);
$args = array( 'categories' => get_cat_ID($cat));
$tags = get_category_tags($args);
$content .= "<ul class='cat-tag'>";
if(!empty($tags)) {
foreach ($tags as $tag) {
$content .= "<li><a href=\"".get_tag_link($tag->term_id)."\">".$tag->name."</a></li>";
}
}
$content .= "</ul>";
echo $content;
?>
样式自己去修改哈,毕竟每个主题的框架结构不一样,自己看如何调整最优!






![Mysql innodb 系统表损坏带来的问题[Warning] InnoDB: Cannot open table XXX/wp_downloads from the internal data dictionary of InnoDB though the .frm file for the table exists. 终极解决办法](https://nrcs.xyz/wp-content/themes/begin/prune.php?src=https://nrcs.xyz/wp-content/uploads/2023/09/e4165-2023-09-28_102533.png&w=280&h=210&a=&zc=1)




评论