Title: PHP &#8211; iframe &#8211; target=&#8221;_top&#8221; &#8211; help
Last modified: August 18, 2016

---

# PHP – iframe – target=”_top” – help

 *  [tinem](https://wordpress.org/support/users/tinem/)
 * (@tinem)
 * [19 years ago](https://wordpress.org/support/topic/php-iframe-target_top-help/)
 * I have this site [http://www.tinemuller.dk/wholocations/bookcode/](http://www.tinemuller.dk/wholocations/bookcode/)
   where I
    have some php code that links to other sites from the markers infowindows
   and it’s functioning.
 *     ```
       <? $info_html='<b>'.$row['post_name'].'</b><br />'.$row['adresse'].'<br
       />'.$row['postnummer']. ' ' . $row['location'].'<br />' .'<b>Position:</b> '
       .$row['lat']. ', ' . $row['lon'].'<br /><br />' .'  Maybe read some more
       informations and make a comment to a blog. Something like <a
       href="'.$wordpress_url.'">this.</a><br><br>Or maybe link to more info.
       Something like <a
       href="http://www.toiletmap.gov.au/browse.aspx?type=area&id=6f950288-da86-450a-9171-e67f5b98c6df">this.</a>';
       ?>
       ```
   
 * Now I’m trying to use an iframe in my WordPress site as you can see here
    (just
   for testing, not sure I will use it this way) [http://www.tinemuller.dk/new_wordpress/map-test/](http://www.tinemuller.dk/new_wordpress/map-test/)
   and if you click the markers infowindows the sites open up INTO the iframe and
   that’s not what I want. Could someone help me how to make the links functioning
   with target=”_top” ?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [foxladi](https://wordpress.org/support/users/foxladi/)
 * (@foxladi)
 * [19 years ago](https://wordpress.org/support/topic/php-iframe-target_top-help/#post-571147)
 * Hi Tine
 * In the file you are linking to in your iFrame, you should add some code to make
   each link open up in their own windows. You do that by adding this code before
   </head>
 * <base target=”_blank”>
 * If you are linking to a PHP file that doesn’t have the head tag, find it in another
   PHP file. They are usually called “header.php”.
 * Good luck!
 * Britt Malka
    Are you reading all your books? [http://www.16min.com](http://www.16min.com)
 *  Thread Starter [tinem](https://wordpress.org/support/users/tinem/)
 * (@tinem)
 * [19 years ago](https://wordpress.org/support/topic/php-iframe-target_top-help/#post-571317)
 * Thanks for your tip Britt. I put the code in my index.php and everything is functioning
   beautifully. Didn’t know it would be so easy.:-)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP – iframe – target=”_top” – help’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [tinem](https://wordpress.org/support/users/tinem/)
 * Last activity: [19 years ago](https://wordpress.org/support/topic/php-iframe-target_top-help/#post-571317)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
