How can I iframe a local page rather than a remote page?
-
My Plugin Structure:
test-plugin (main plugin folder)
- assets (folder)
- includes (folder)
- languages (folder)
- test.php (the file I want my iframe to load)
function test_plugin_admin_sub_page(){ ?> <style> iframe { width: 1px; min-width: 100%; } </style> <div class="wrap"> <iframe id="testIframe" src="test.php"></iframe> </div> <?php }
Using the code above WordPress cannot find the “test.php” page, and since the iframe is in HTML code I can’t use the typical ‘plugin_dir_path( FILE )’ function. How can I create an iframe to display a local page located in the same plugin folder rather than a remote page?
Thank you in advance for any help that can be provided!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How can I iframe a local page rather than a remote page?’ is closed to new replies.