【发布时间】:2020-06-14 15:16:21
【问题描述】:
【问题讨论】:
标签: css wordpress woocommerce
【问题讨论】:
标签: css wordpress woocommerce
WooCommerce 包含一个有用的模板系统,允许您编辑自定义电子邮件模板 - 每个订单状态都有自己独特的模板,并且每个都共享一个包含样式的主要模板。
emails 目录:/wp-content/themes/theme-name/woocommerce/emails。/plugins/woocommerce/templates/emails/email-styles.php 找到的文件并将其粘贴到主题中新创建的文件夹中。 您无法直接从插件文件夹中对此文件进行编辑,因此请确保将其复制到您的主题中,然后您可以进行所有所需的更改。
【讨论】:
您可以在您的主题中重写电子邮件模板。例如yourtheme/woocommerce/emails/email-header.php。这是 woocommerce 模板,您应该会看到如下内容:
<!-- Header -->
<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_header">
<tr>
<td id="header_wrapper">
<h1><?php echo $email_heading; ?></h1>
</td>
</tr>
</table>
<!-- End Header -->
希望能帮到你。
【讨论】:
email-header.php 并更新h1 标签。
更改 WooCommerce 电子邮件样式,请转到 plugins/woocommerce/templates/emails/email-styles.php
复制文件并将此文件粘贴到您的模板文件中:
更改 WooCommerce 电子邮件样式并将此文件粘贴到 current_theme/woocommerce/templates/emails/email-styles.php
找到合适的类并编辑样式
#header_wrapper {
padding: 36px 48px; // Increase padding to increase height
display: block;
}
希望对你有帮助
【讨论】: