It looks like the WP Wysiwyg strips iframe code from posts if I try to post with one. Is this supposed to happen? What other code will it strip? How can I prevent this?
It looks like the WP Wysiwyg strips iframe code from posts if I try to post with one. Is this supposed to happen? What other code will it strip? How can I prevent this?
Do you want to only "Display" that code? Or want to execute it??
To display:
Paste the code in wysiwyg editor.
To Execute: you need to use some plugin..
Some options:
--There are a few extensions that let you execute PHP in your posts. (One used to be called ExecPHP -- if that's still maintained, that would be a good one.)
-- There are several plugins that prevent WP from changing your HTML in various ways
-- Turn off the visual editor altogether. I believe when you do, you are less likely to get filtered HTML, although I may be wrong about that re: iFrames.
-- look in the codex for "filters" and "actions" -- WordPress allows you to put filters in your functions.php file and elsewhere to add and remove filters from the way it processes various data. So you can probably find a hook for the editor's filtering of iFrames and remove or alter it...
This topic has been closed to new replies.