前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >给WordPress大前端DUX主题文章标题右上角加标签

给WordPress大前端DUX主题文章标题右上角加标签

作者头像
于飞云计算
修改2019-07-22 17:17:32
7790
修改2019-07-22 17:17:32
举报
文章被收录于专栏:技术经验分享技术经验分享

今天全百科网给大家分享最新研究小成果如何给WordPress 大前端DUX主题文章标题右上角加自定义标签。效果可以查看本篇文章标题右上角哈。

效果预览

给WordPress大前端DUX主题文章标题右上角加标签
给WordPress大前端DUX主题文章标题右上角加标签

其实非常简单,只需一段代码即可。

单篇显示

在后台用文本编辑模式把下方代码添加到文章中。

代码语言:javascript
复制
<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="{ &quot;error&quot;: &quot;&lt;errMsg string&gt;&quot;, } ">全百科网</button></div>

标签

全站显示

如果想把这个标签统一全站显示,可以把代码放到主题文件下的single.php文件中即可。

是不是很简单,对于有需要的同学可以尝试使用哈。

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 效果预览
  • 单篇显示
  • 全站显示
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档