add_filter('wp_mail_content_type',create_function('', 'return "text/html";'));
add_filter('wp_mail_content_type', 'sola520_use_html');
function sola520_use_html( $content_type ) {
if( '你的条件' )
return 'text/html';
else
return $content_type;
}
$headers = "MIME-Version: 1.0\n" . "Content-Type: text/html;";
wp_mail('[email protected]', 'The subject', '<p>The <em>HTML</em> message</p>', $headers);
以上就是安达网络工作室关于《WordPress中发送HTML邮件的方法》的一些看法。更多内容请查看本栏目更多内容!
成果: 将上面的函数放到你的主题的 functions.php 文件中: 代码如下: function theme_echo_pagenavi(){ gl...
根本模板文件 style.css : CSS(款式表)文件index.php : 主页模板archive.php : Archive/Category模板404.ph...
在WordPress中,咱们发如今写文章时,可视化模式下会对html代码进行清算,例如对<>等符号转化为html实体,对...
用动态化当然能够处理这些成绩,不过关于流量不大的博客就没必要了。 wordpress自带有缓存体系,要害的函数...
此时假如上传一个不在预约义的平安扩大名列表,如.lrc,会报错: File type does not meet security guidel...
置信接触过WP零碎的冤家都理解,老版零碎的上传图片门路是默许指向wp-content目录下的。做过WP博客的冤家应...