Tag Info

New answers tagged

0

i want any page falls under that parent page includes that test.php file Sound like you need the is_tree() function. I've used it several times for this type of functionality. First you would declare this function in your functions.php file: function is_tree($pid) { // $pid = The ID of the page we're looking for pages underneath global $post; // ...


0

If test.php is in your theme directory, try locate_template('test.php') instead. If it is somewhere else, make sure that you are trying to include it properly via the path needed. Just doing include 'test.php' most likely makes it think that test.php is in the root directory of the site as /index.php runs the site (e.g. where your wp_config.php file is ...


0

If I understand your question correctly, you are just looking for a way to include PHP files in other PHP files. There are a couple different ways, like include or require (as well as include_once and require_once, although it sounds like you'll be referencing the same file more than once possibly), both of which basically just bring an external php file in ...



Top 50 recent answers are included