Working with WordPress and want to use the PHP function inside this code
<?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"); }?>
What i wan’t is to use WordPress PHP function get_template_directory() inside of this just the way like i would do this
<?php get_template_directory(); ?>/folder/page1.html
Have been trying some diffrent solutins but PHP is not my strongest area so a little help would be fantastic.
OR
It is better to store it in a variable not to cause overhead of calling the function a lot of times.
Hope it helps.