gpt4 book ai didi

html - 在 Wordpress 中使用 the_category() 自定义 Bootstrap 按钮样式

转载 作者:行者123 更新时间:2023-11-28 04:39:48 24 4
gpt4 key购买 nike

我正在尝试设置从用户输入的每个类别标签生成的自定义按钮的样式。这是它目前的样子:

this is the incorrect version

它应该是这样的:

this is what it should look like

这里是按钮样式的地方,包括 the_category();标签(样式出现在后流派和后流派文本类中):

<button type="button" class="btn btn-outline-secondary post-genre"><span class="post-genre-text"><?php the_category(', '); ?></span></button>

感谢您提供的任何帮助!

最佳答案

您应该循环遍历类别,而不是在一个按钮中拆分类别。

Looping through categories

关于html - 在 Wordpress 中使用 the_category() 自定义 Bootstrap 按钮样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41267509/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com