2015-01-12 76 views
1

我試圖通過iFrame從其他網站獲取數據。其他網站要求我們在Wordpress中使用我們的有利主題的shtml文件。 WordPress的沒有以.shtml結尾的網址如何將這個文件添加到WordPress?如何將shtml文件添加到Wordpress

回答

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'); 
+0

謝謝,但補充說,到function.php文件,我怎麼添加實際後。 newsletter.shtml文件? –

+0

您應該可以通過Wordpress中的媒體庫上傳.shtml。 –