Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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