Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将shtml文件添加到Wordpress_Wordpress_Shtml - Fatal编程技术网

如何将shtml文件添加到Wordpress

如何将shtml文件添加到Wordpress,wordpress,shtml,Wordpress,Shtml,我试图通过iFrame从另一个站点获取数据。另一个站点要求我们在Wordpress中使用vantage主题创建一个shtml文件。Wordpress没有以.shtml结尾的URL。如何将此文件添加到Wordpress?由于Wordpress默认不识别此文件类型,您需要添加它 将其附加到主题中的functions.php文件: 函数my_theme_custom_upload_mimes$existing_mimes{ //将shtml添加到mime类型列表中 $existing_mimes['s

我试图通过iFrame从另一个站点获取数据。另一个站点要求我们在Wordpress中使用vantage主题创建一个shtml文件。Wordpress没有以.shtml结尾的URL。如何将此文件添加到Wordpress?

由于Wordpress默认不识别此文件类型,您需要添加它

将其附加到主题中的functions.php文件:

函数my_theme_custom_upload_mimes$existing_mimes{ //将shtml添加到mime类型列表中 $existing_mimes['shtml']='text/html'; //使用添加的mime类型将数组返回给函数 返回$existing_mimes; } 添加“mime类型”、“我的主题”、“自定义”上传“mime”过滤器;
谢谢,但是在将其添加到function.php文件之后,如何添加实际的。newsletter.shtml文件?您应该能够通过Wordpress中的媒体库上传.shtml。