飞流 发表于 2025-10-9 22:50:31

子比主题 – 邮箱默认样式修改美化

这是一款子比主题邮箱样式美化,很多人不是很喜欢子比主题自带的邮箱样式,那么我接下来有一款非常简约的邮箱样式,还是不错的一款样式美化,喜欢的自行部署吧!


代码部署
定位:/wp-content/themes/zibll/inc/functions/zib-email.php文件,我们搜”$content“,将下面的代码替换这个里面全部,可能很多人听不懂,那么一张图片就懂了,图片与替换代码如下

$content = '<div style="max-width: 600px; margin: 0 auto; width: 100%; background-color: #ffffff; border-radius: 16px; box-shadow: 0 4px 20px rgba(32,102,255,0.08);">
    <!-- 头部logo区域 -->
    <div
      style="padding: 30px 20px; text-align: center; background: linear-gradient(135deg, #2066ff 0%, #1955d4 100%); border-radius: 16px 16px 0 0;">
      <a style="text-decoration: none;" href="https://idc.sxchl.cn" target="_blank" rel="noopener"> <img
                style="max-height: 45px; width: auto; max-width: 100%;" src="' . $logo . '"
                alt="' . $blog_name . '" /> </a>
    </div>
    <!-- 主要内容 -->
    <div style="padding: 30px 20px;">
      
      <!-- 账户信息框 -->
      <div
            style="background: linear-gradient(to right, #f8f9ff, #f0f5ff); border-radius: 12px; padding: 20px; margin: 20px 0; border: 1px solid rgba(32,102,255,0.1);">
            ' . $message . '
      </div>
      <!-- 提示信息 -->
      <div style="background-color: #f8f9fa; border-radius: 8px; padding: 15px; margin: 20px 0;">
            <p style="color: #666666; font-size: 13px; line-height: 1.6; margin: 0;"><span
                  style="color: #2066ff;">●</span> ' . $description . '</p>
      </div>
      <!-- 修改密码按钮 -->
      <div style="text-align: center; margin: 30px 0;">' . $con_more . '</div>
    </div>
    <!-- 底部信息 -->
    <div
      style="padding: 20px 15px; background-color: #f8f9fa; border-radius: 0 0 16px 16px; border-top: 1px solid #eef0f5;">
      <p style="color: #999999; font-size: 12px; text-align: center; margin: 0; line-height: 1.8;">
            本邮件由系统自动发送,请勿直接回复<br />© 2025 ' . $blog_name . ' 版权所有</p>
    </div>
</div>';

页: [1]
查看完整版本: 子比主题 – 邮箱默认样式修改美化