I am trying to embed the admin "new post" WordPress page into an iframe:

<iframe height="500px" frameborder="0" width="740px" src="my_wordpress_domain/wp-admin/post-new.php"/>

For some reason the iframe loads a blank page. The link itself works in a separate tab and so does the wordpress home page.

Is this a security issue, if so, how can I circumvent it?


By default WordPress doesn’t allow to embed the admin pages into a frame. From wp-includes/default-filters.php:

add_action( 'admin_init', 'send_frame_options_header', 10, 0 );

To enable embedding, remove the action in a plugin:

remove_action( 'admin_init', 'send_frame_options_header' );

Be aware of the security implications. I wouldn’t do that.


There's no straight forward way around this if you are using wordpress.com hosted page. If you have independent hosting, make sure you enter this in the html page, or consider one of the iframe plugins. I use iframe embedder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.