今天全百科网给大家分享最新研究小成果如何给WordPress 大前端DUX主题文章标题右上角加自定义标签。效果可以查看本篇文章标题右上角哈。
其实非常简单,只需一段代码即可。
在后台用文本编辑模式把下方代码添加到文章中。
<div class="tools"><button class="btn copybtn" style="box-sizing: border-box; color: #767676; font-style: inherit; font-variant: inherit; font-weight: normal; font-stretch: inherit; font-size: 12px; line-height: 1.42857; font-family: inherit; margin: 0px; overflow: visible; text-transform: none; -webkit-appearance: button; cursor: pointer; display: inline-block; text-align: center; vertical-align: middle; touch-action: manipulation; background-image: none; border: 1px solid #e1e1e8; white-space: nowrap; padding: 5px 8px; border-radius: 0px 4px; user-select: none; position: absolute; background-color: #ffffff; right: -2px; top: -1px;" title="" data-toggle="tooltip" data-placement="top" data-original-title="全百科网" data-clipboard-text="{ "error": "<errMsg string>", } ">全百科网</button></div>
标签
如果想把这个标签统一全站显示,可以把代码放到主题文件下的single.php文件中即可。
是不是很简单,对于有需要的同学可以尝试使用哈。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。