首先,需要找到主题下面的 functions.php
.要知道,functions.php
堪称万能。将其添加到当前主题函数模板 functions.php
的末尾,相关代码如下:
显示样式
.hidden-content,
.weixin-form {
padding: 1.5rem;
margin: 1.5rem 0;
border: 3px dashed #ff4400;
box-shadow: 0 0 15px rgba(255, 68, 0, 0.3);
border-radius: 15px;
background-color: rgba(255, 220, 200, 0.2); /* 添加淡粉色背景 */
text-align: center; /* 水平居中 */
}
.weixin-n {
color: #ff4400;
font-size: 1.5rem;
padding: 0.8rem;
background-color: rgba(255, 68, 0, 0.15);
border-radius: 8px;
font-family: 'Arial', sans-serif; /* 更改字体 */
text-transform: uppercase; /* 大写显示 */
text-align: center; /* 水平居中 */
}
.weixin-form img {
width: 200px;
height: auto;
margin: 1.5rem;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3); /* 增强图片阴影 */
display: block; /* 确保图片水平居中 */
margin-left: auto;
margin-right: auto;
}
默认主题:添加到主题样式文件中或者外观 → 自定义 → 额外CSS中
新的主题其他主题:主题功能—自定义—自定义样式css代码󠄐󠄹󠅀󠄪󠄣󠄩󠄞󠄡󠄤󠄩󠄞󠄢󠄤󠄥󠄞󠄢󠄢󠄣󠄬󠅒󠅢󠄟󠄮󠄐󠅅󠄹󠄴󠄪󠄣󠄠󠄬󠅒󠅢󠄟󠄮󠄾󠅑󠅝󠅕󠄪󠇖󠆉󠆪󠇕󠅸󠆋󠄬󠅒󠅢󠄟󠄮󠅄󠅙󠅝󠅕󠄪󠄡󠄧󠄤󠄠󠄩󠄢󠄤󠄢󠄥󠄣󠄬󠅒󠅢󠄟󠄮󠇕󠆬󠅰󠇕󠆯󠅳󠇕󠆞󠆍󠄐󠇗󠅹󠅸󠇖󠆍󠅳󠇖󠅹󠅰󠇖󠆌󠅹󠄬󠅒󠅢󠄟󠄮
使用方法
[weixin key=12138 reply= 密码 ] 隐藏内容 [/weixin]
公众号配置
我们配置了一个自动回复功能。在公众号中输入“密码”,之后便会收到“12138”的验证码。需注意,这里的自动回复内容一定要与“Key=”后面填写的保持一致,否则将无法打开文件。
THE END
暂无评论内容