Welcome to WebmasterWorld Guest from 23.22.220.37

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

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

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

New User

joined:Nov 19, 2012
posts:23
votes: 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.
9:53 am on Feb 14, 2013 (gmt 0)

Senior Member

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

joined:Apr 19, 2002
posts:3171
votes: 8


why would it? they are completely different files.
9:54 am on Feb 14, 2013 (gmt 0)

New User

joined:Nov 19, 2012
posts:23
votes: 0


So there is no way to make it work at all?
10:42 am on Feb 14, 2013 (gmt 0)

Senior Member

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

joined:Aug 7, 2003
posts:4783
votes: 0


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 ?
10:52 am on Feb 14, 2013 (gmt 0)

New User

joined:Nov 19, 2012
posts:23
votes: 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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members