关于如何设置格式以在wp_list_categories()函数中打印出额外属性的任何想法?
目前, 此函数返回以下值:
<ul class="projects">
<li class="wp-post"><a href="category/projects">Projects</a></li>
</ul>
如何更改此功能, 以同时为” li”和” a”元素输出” id”和” title”标签?
是否有文件可以直接编辑, 或者我需要找到一个插件?
#1
get_categories()函数将检索所有类别及其属性的列表, 你可以循环浏览并输出自己的HTML。
有关示例, 请参见get_categories文档。
来源:
https://www.srcmini02.com/67772.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_36822.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57