我正在尝试通过 iFrame 从另一个站点提取数据。另一个站点要求我们在 Wordpress 中使用我们的 vantage 主题有一个 shtml 文件。Wordpress 没有以 .shtml 结尾的 url 如何将此文件添加到 wordpress?
1 回答
0
由于默认情况下 WordPress 无法识别此文件类型,因此您需要添加它。
将此附加到主题中的 functions.php 文件中:
function my_theme_custom_upload_mimes( $existing_mimes ) {
// add shtml to the list of mime types
$existing_mimes['shtml'] = 'text/html';
// return the array back to the function with our added mime type
return $existing_mimes;
}
add_filter( 'mime_types', 'my_theme_custom_upload_mimes' );
于 2015-01-12T21:43:33.563 回答