Created
August 10, 2015 07:55
-
-
Save nickdavis/c1c66cddfe1d57d3d37d to your computer and use it in GitHub Desktop.
Modification of https://gist.github.com/nickdavis/ac2f20d9821303c390e9 to use a fixed URL for the iframe instead of a custom field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Template Name: iFrame | |
/** | |
* The URL of what you want to appear in the iframe | |
*/ | |
$url = 'http://nickdavis.co/full-page-iframe-template-genesis-wordpress/'; | |
/** | |
* Display a full page iFrame and strip out all other content on the page | |
* | |
* @link http://www.dev-explorer.com/articles/full-page-iframe | |
* @link http://www.billerickson.net/full-width-landing-pages-in-genesis/ | |
* | |
*/ | |
?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="EN"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title><?php the_title(); ?></title> | |
<style type="text/css"> | |
html {overflow: auto;} | |
html, body, div, iframe {margin: 0px; padding: 0px; height: 100%; border: none;} | |
iframe {display: block; width: 100%; border: none; overflow-y: auto; overflow-x: hidden;} | |
</style> | |
<?php | |
// Add any Global or Single scripts set in Genesis options | |
genesis_header_scripts(); | |
?> | |
</head> | |
<body> | |
<iframe id="tree" name="tree" src="<?php echo $url; ?>" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" scrolling="auto"></iframe> | |
</body> | |
</html> | |
<?php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment