Support » Everything else WordPress » Using WordPress PHP in iFrame

  • I have created a site that is predominantly HTML with a few pages using iframes to keep the style consistent. I want to pull WordPress PHPs into the iFrame as well for the same reason. I have used the <iframe src=”index.php”> but alas nothing.

    Any ideas where I could be going wrong?

    Oh, I did include a meta that stated the refresh but all this did was after a fe seconds the whole page went white!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Perhaps you forgot to close the tag.
    <iframe src="index.php"></iframe>
    I tested it without and it didn’t matter.

    Which website is concerned? What exactly did you want to do with the meta refresh? Of course an iframe will disappear if the browser is overwriting the current site with the one of the meta tag!

    Nope, closed the tags:

    <iframe src=”index.php” scrolling=”auto” width=”700″ height=”300″ frameborder=”0″>
    I am sorry but either your browser does not support inline frames or you have this option disabled.

    But all I get is a big white rectangle in the middle of my page (where the iFrame is) and a notice telling me I am looking for something that is not there.

    Sounds good that far. So the iframe itself works but the new site is not found? Is it in another folder?

    Okay, yes I moved the files to the worpress root (rather than in the themes section where they were). I still get the white rectangle but I get this text now:

    /* Short and sweet */
    define(‘WP_USE_THEMES’, true);


    put in the entire path to the index.php…I had the same problem the other day when I was messin around with Iframes ta check out the effect.

    Decided not to use the iframe becuase search engine indexers will pull content onto the results page with a link going to a page within the WP…when that link is followed the user ends up on the page, but the page is not in the iframe.

    <iframe src=””>

    if your wonderin…I tryed a different set up thats more SE friendly…I didn’t finish it or test it, but I got the idea down.

    I tryed useing just frames…it has the same problem of the user gettin linked to a page, but outa the frames, but I have a javaScript that pulls the page and the user into the mainframe on the main page.

    Problem then was the Jscript would need to be included on every page within the WP and each directory that has an index.php would also need a copy of the index.html frame set from the main page.

    I don’t know too much about Jscript programing, but im betting someone can figure out how to not need the copy of the frame set in each directory.

    Got it working by using the full URL. Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Using WordPress PHP in iFrame’ is closed to new replies.