0
与WordPress的工作,并要使用此代码写PHP路径+ URL扩展,如果/包括
<?php if (is_page(19074)) {
include("/home/something/public_html/wp-content/themes/mytheme/folder/page1.html");
}
elseif (is_page(18956)) {
include("home/something/public_html/wp-content/themes/mytheme/folder/page2.html");
}
elseif (is_page(19082)) {
include("home/something/public_html/wp-content/themes/mytheme/folder/page3.html");
}
else {
include("home/something/public_html/wp-content/themes/mytheme/folder/page4.html"); }?>
我wan't是使用WordPress的PHP函数get_template_directory()内内的PHP函数这就像我的方法就是做这个
<?php get_template_directory(); ?>/folder/page1.html
一直在尝试一些不同势solutins但PHP是不是我的最强的区域,这样一点点的帮助将是非常美妙。
'include(get_template_directory()。'/folder/page1.html')'? – 2013-02-17 23:05:54