WordPress.org

Forums

[resolved] Embedding in iFrame (3 posts)

  1. Jacee
    Member
    Posted 6 years ago #

    I've recently installed WordPress. I had no trouble setting it up or editing my own template. I got it exactly how I wanted it thinking that I would use it by calling it through an iFrame on my main page. The thing is, I still just use iFrames instead of having the sidebar and header and everything reload every time you go to a new page.

    Whenever I open the actual page that WordPress is installed on, it works fine and looks exactly the way I want it to look. When I look at the index.html page that I put the iFrame on, however, I only get this message:
    Warning: Cannot modify header information - headers already sent by (output started at /home/andylawr/public_html/wordpress/wp-blog-header.php:6) in /home/andylawr/public_html/wordpress/wp-includes/pluggable.php on line 865

    Can someone please help me make this work? I've seen it done before, but I'm obviously doing something wrong!

    Oh, in case it helps, I get the same message even when I use a theme I haven't edited, so I don't think it was anything I changed.

    And someone suggested I install the Embed Iframe plugin; I didn't think it would help (it's the opposite of what I want), but I did, and I was right. It didn't change anything at all.

  2. @mercime
    Volunteer Moderator
    Posted 6 years ago #

    I know you clicked this as resolved. This setup worked for me in WP and WPMU installs. Create a Page Template and add an iframe inside. In Page > Add New, just type in the name of the page and publish.

    <?php
    /*
    Template Name: Iframe Page
    */
    ?>
    <?php get_header(); ?>
    <div id="markerpage">
    <div id="contentframe">
    <p>A sample webpage: <a href="http://www.example.org/" target="_blank">http://www.example.com/</a></p>
    <iframe src="http://www.example.com/" frameborder="0" width="100%" height="1000">Website of Example.com</iframe>
    </div>
    <?php get_footer(); ?>
  3. wilsontd
    Member
    Posted 5 years ago #

    mercime,

    I saw you post this a couple of times in regards to using the plug-in Embed iframe 1.0

    I just wanted to say ... THANK YOU !!

    I did that and it worked like a charm. Maybe having a specific URL mentioned in a "template" seems kinda odd -- (I will never use those templates again for any other new pages, for example) -- but it works so well that ... who cares?! :-)

    Thanks again for sharing this! I am happy with my working page!

    Tim

    WordPress 2.8.4 , Atahualpa 3.4.4 , Embed iframe 1.0 , Akismet 2.2.6

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags