Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-15-2013, 03:25 PM   PM User | #1
joliett89
Regular Coder

 
Join Date: Jul 2011
Posts: 172
Thanks: 64
Thanked 2 Times in 2 Posts
joliett89 has a little shameless behaviour in the past
iframe and php code

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?

Code:
<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.
joliett89 is offline   Reply With Quote
Old 02-16-2013, 08:57 AM   PM User | #2
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,880
Thanks: 9
Thanked 291 Times in 287 Posts
Dormilich is on a distinguished road
Quote:
Originally Posted by joliett89 View Post
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?
yes. content in a frame is a separate web page. it’s as if you had two windows.
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Users who have thanked Dormilich for this post:
joliett89 (02-17-2013)
Old 02-16-2013, 09:40 AM   PM User | #3
joliett89
Regular Coder

 
Join Date: Jul 2011
Posts: 172
Thanks: 64
Thanked 2 Times in 2 Posts
joliett89 has a little shameless behaviour in the past
Quote:
Originally Posted by Dormilich View Post
yes. content in a frame is a separate web page. it’s as if you had two windows.
And there's no way to get around it, right?
joliett89 is offline   Reply With Quote
Old 02-16-2013, 09:42 AM   PM User | #4
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,880
Thanks: 9
Thanked 291 Times in 287 Posts
Dormilich is on a distinguished road
depends on what you understand by "interaction".
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Users who have thanked Dormilich for this post:
joliett89 (02-17-2013)
Old 02-16-2013, 08:38 PM   PM User | #5
joliett89
Regular Coder

 
Join Date: Jul 2011
Posts: 172
Thanks: 64
Thanked 2 Times in 2 Posts
joliett89 has a little shameless behaviour in the past
Quote:
Originally Posted by Dormilich View Post
depends on what you understand by "interaction".
I am basically trying to get it to work with the rest of the Wordpress. It is a Wordpress blog, one of the files of the program is called sidebar.php (just like regular website, it gets loaded with header, content, footer etc), and I have the iframe included in that. I would like the php code to work with the rest of the program. The code is in the first post.
joliett89 is offline   Reply With Quote
Old 02-16-2013, 10:15 PM   PM User | #6
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,454
Thanks: 0
Thanked 498 Times in 490 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Quote:
Originally Posted by joliett89 View Post
I am basically trying to get it to work with the rest of the Wordpress. It is a Wordpress blog, one of the files of the program is called sidebar.php (just like regular website, it gets loaded with header, content, footer etc), and I have the iframe included in that. I would like the php code to work with the rest of the program. The code is in the first post.
The content of the iframe is NOT a Wordpress blog - it is a completely separate page. If you want it to be part of the Wordpress blog then get rid of the iframe.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Users who have thanked felgall for this post:
joliett89 (02-17-2013)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:58 AM.


Advertisement
Log in to turn off these ads.