Home > OS >  How do I use an iFrame for my header in Wordpress twenty seventeen?
How do I use an iFrame for my header in Wordpress twenty seventeen?

Time:12-12

I'm pretty new to Wordpress, and I'm currently trying to make a site using the twenty-seventeen template. My ultimate goal is to use an iFrame of a sketch I made in p5 as my header media, so that when people visit the site they see a cool interactive piece instead of just a static image. Does anyone here know how to do that? I'm comfortable doing some hand coding, but I'm pretty unfamiliar with php.

For reference, the site I'm working on is up at http://www.staging3.robinseggstudio.com, and the sketch I'm trying to replace the image with is up at http://robinseggstudio.com/homePage_12-5c/RobinSketch/.

The site is built in Wordpress but hosted on Siteground.

Thanks!

CodePudding user response:

You should not use iframe. You should really avoid using iframes (due to a number of reasons).

You should embed your p5 JS file and HTML/CSS contents within the header.php file, so they load from your workdpress and not from a remote source.

I see you mention that you are pretty new to WP, but I would suggest you change your ultimate goal, and do this properly. I assume you would also learn a lot more in the process. Iframes is not the solution for this, although it looks tempting and easy..

CodePudding user response:

You can do that via editing the header.php of the theme.

  • Related