Php 正在将文件加载到WordPress页面,内容被包装在divs上并放错位置
我正在尝试加载一个html文件来填充我的页面模板的一部分Php 正在将文件加载到WordPress页面,内容被包装在divs上并放错位置,php,html,wordpress,Php,Html,Wordpress,我正在尝试加载一个html文件来填充我的页面模板的一部分 function mostSearched (){ include '/mostsearched.html'; $c = ob_get_clean(); return $c; } 但是输出被包装在破坏模板的div上 文章#post-2.post-2.page.type-page.status-publish.hentry 文件内容仅包含以下内容: XXXXXXXXXxx <br> XXXXXXXXXx
function mostSearched (){
include '/mostsearched.html';
$c = ob_get_clean();
return $c;
}
但是输出被包装在破坏模板的div上
文章#post-2.post-2.page.type-page.status-publish.hentry
文件内容仅包含以下内容:
XXXXXXXXXxx <br>
XXXXXXXXXxx <br>
XXXXXXXXXxx <br>
xxxxxxxxxx
XXXXXXXXXX
XXXXXXXXXX
成功地用这个
$c = file_get_contents('mostsearched.php');
return $c;
无论如何谢谢你