I try to find a solution or plugin to add :
- an iframe
- a javascript code
inside posts
I do not find anything working
Could you help please
| SitePoint Sponsor |



I try to find a solution or plugin to add :
- an iframe
- a javascript code
inside posts
I do not find anything working
Could you help please


If there aren't any plugins then you may need to add the tags (ie. iframe, script) to the content filter code. Although this may introduce a security risk if you allow others to post, so be careful.



???
RAW HTML = http://wordpress.org/extend/plugins/raw-html/
It's fine to add JS in the code mode with this plugin
[RAW]... JS ...[/RAW]
For iFrames ... no idea![]()


I've added both JS and iframes to WP without any special plugins or modifications. In fact... I have a snippet of JS that creates a dynamic-height iframe (height changes to the size of the content) specifically created for—and used in—WP.
Has something changed in the last couple revisions that disallows this?





If that Raw HTML plugin does what it says it does (I haven't tried it), then it should be able to do iframes no problem at all.
Note: there is a warning about bugs in this plugin here ... http://wordpress.org/support/topic/152760
BlazeMiskulin - A standard WordPress 2+ installation will mess up most Javascript, HTML etc. without a plugin. So unless you are using a plugin and have forgotten about it or have hacked the core code then I have no idea how you managed to place an iframe in your posts.


The plugin adds filters to "the_content" so it will not work for "the_content_rss", "the_excerpt", or "the_excerpt_rss".
Also note that the plugin only allows for 1 set of "RAW" tags per post. But it appears that inside them anything goes, including an iframe.



I gave this solution (the RAW HTML plugin) because I tried it - of course
Fine with javascript
If I had no success with the iframe it's because the code given by the affiliate program was wrong
With a clean code it does work even without the RAW plugin
Well - The use of javascript and iframes with Wordpress is not so easy
Last edited by Lastbutnotleast; Mar 11, 2008 at 19:15.
Bookmarks