How to add an iframe to sidebar.php? (3 posts)

  1. json21
    Posted 2 years ago #

    I am using Twenty Eleven theme. I was trying to add the following code, but it does not seem to be working:

    <iframe src="frame.html" name="test" height="600" width="180"></iframe>

    frame.html is located in the twentyeleven directory, so it should work. I get a 310 error instead. Do I need to use the iframe-widget plugin in order to get it to work?

    Thank you.

  2. blackpenpress
    Posted 2 years ago #

    <iframe src="<?php echo get_template_directory_uri(); ?>/frame.html" name="test" height="600" width="180"></iframe>

  3. json21
    Posted 2 years ago #

    The code is working. Thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Topic