最近访客
q12492501的头像-狐狸库
q12492501
百度未收录

WordPress全站左侧边栏添加联系站长按钮教程

使用步骤

只需要在两个文件中添加一行代码就可以实现左侧联系站长功能,具体演示效果可以查看本站效果。

1、后台主题设置 >> 自定义代码 >> 自定义 CSS 把下面的代码添加到里面

/*左侧联系站长*/
.contact-help{position: fixed; z-index: 101; left: 0; top: calc(50% - 30px); margin-top: -36px; width: 28px; height: 72px; transition: all .3s; font-size: 12px;background: var(--main-bg-color);border-radius: 0 5px 5px 0; padding: 8px 7px; line-height: 14px;}@media screen and (max-width: 768px){.contact-help{display:none;}}

2、在主题目录下 themes/zibll/footer.php 下,添加下面的 PHP 代码:

<!--左侧联系站长-->
<a href="http://wpa.qq.com/msgrd?v=3&uin=123456&site=qq&menu=yes" target="_blank" class="contact-help main-shadow"  style="font-weight:700;" />联系站长</a>

http://wpa.qq.com/msgrd?v=3&uin=123456&site=qq&menu=yes

上方链接换成自己的QQ号或其他联系方式链接

WordPress后台 >> 外观 >> 小工具 >> 自定义html,输入下方代码即可。

如果要每个页面显示,将代码放入footer.php即可。

温馨提示: 本文最后更新于2023/03/19 18:17:56。若文章内容或图片失效,请 留言联系站长反馈!
!
也想出现在这里? 联系我们
创意广告
© 版权声明
THE END
点赞0赞赏 分享
评论 共4条

请登录后发表评论

    请登录后查看评论内容