2017-06-09 69 views
1

我想顯示一些WP內容,但只顯示靜態文本。沒有WP內容出現。 它看起來似乎沒有WP腳本正在加載查看開發工具源代碼?WordPress iframe內容現在顯示

對我所錯過的任何幫助都非常感謝。

這裏是page.php文件內我的電話:

<iframe src="http://www.xxxxxx.com/wp-content/themes/themename/iframe-gview.php" width="100%" height="500" frameBorder="0"></iframe> 

我的PHP模板代碼:

<!DOCTYPE html> 
<html> 
<head> 
<meta charset="utf-8"> 
<title>Applications</title> 
<?php wp_head(); ?> 
</head> 
<body> 
<link rel="stylesheet" type="text/css" href="http://www.xxxxxx.com/wp-content/themes/themename/assets/css/style.css"> 

    Static Content 

    <?php 
     echo do_shortcode('[gravityview id="1234"]'); 
    ?> 

<?php wp_footer(); ?> 
</body> 
</html> 
+0

什麼iframe中的錯誤? – vel

+0

上面更新了我的解釋@vel –

+0

您是否從任何其他站點訪問此URL'http:// www.xxxxxx.com/wp-content/themes/themename/iframe-gview.php' – vel

回答

0

如@vel如上所述,這解決了我的問題:

<?php require_once('../../../wp-load.php'); ?>