Welcome to WebmasterWorld Guest from 54.167.58.159

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Does php code in iframe work with code outside of this iframe?

     

tbe22

9:37 am on Feb 14, 2013 (gmt 0)



I have a wordpress blog, with an iframe included in sidebar.php. I have some wordpress specific code inside of this iframe, and it does not seem to "interact" with the rest of the wordpress code. Is it normal? Is there any way to get around this one?

<ul><li><a href="http://www.domain.com/" target="_blank">domain.com</a></li><?php $blog_title = esc_attr( get_bloginfo( 'name', 'display' ) );$words = split(' ', $blog_title);$actor_name = ucwords($words[0] . ' ' . $words[1]); ?><li><a href="http://www.name.com/pictures/<?=str_replace(' ', '+', $actor_name)?>" target="_blank"><?=$actor_name?> Model Search</a></li></ul>

Thank you.

topr8

9:53 am on Feb 14, 2013 (gmt 0)

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



why would it? they are completely different files.

tbe22

9:54 am on Feb 14, 2013 (gmt 0)



So there is no way to make it work at all?

swa66

10:42 am on Feb 14, 2013 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



The purpose of an iframe is to have a different "webpage" inside a box on another page. If they are related it is either because you make it so on the server, or either in your mind. For the browser and the server as such: they are 2 independent requests.

So the question you probably should pose yourself is : why did I use an iframe ?

tbe22

10:52 am on Feb 14, 2013 (gmt 0)



I used the iframe because I am hiding a lits of links from google. I have it blocked by robots.txt. I am hiding a network of sites.