Embed WordPress Admin in an iframe

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.

WordPress wp_nav_menu within iFrame

To get a working nav menu WordPress needs to be set up complete. My suggestion is to use add_feed(). Ignore the name, you get text/html as output. Let’s start with code <?php # -*- coding: utf-8 -*- /* Plugin Name: T5 Iframe Nav Menu Description: Display a nav menu in an iframe. Version: 2012.05.18 Refresh … Read more

Remove Header and Footer in iframe

You could detect the $_SERVER[‘HTTP_REFERER’] variable to detect whether the page is requested from an external server. If so, then you should load an alternative header and footer using get_header() and get_footer(). You’ll need those calls to make sure all scripts and stylesheets are loaded, but you can remove the other content that make up … Read more

Error with Custom Admin Screen in iframe Thickbox

Interesting question. Investigating it, I’ve found a [wp-hackers] thread by the same Dion Hulse which gives a bit more of information. First, a testing page with a simple link which will open another admin page in a thickbox. add_action(‘admin_menu’, ‘wpse_71437_admin_submenu’); function wpse_71437_admin_submenu() { add_menu_page( ‘TB’, ‘<span style=”color:#e57300;”>Thickbox</span>’, ‘edit_pages’, ‘open_hidden_page_in_thickbox’, ‘wpse_71437_submenu_page’, ”, // no icon 1 … Read more

Youtube – Embed as IFRAME

If you don’t want to utilize the latest oembed functions and want the old iframe way from any page or post, you can do these: Get the embed code from any youtube video. While editing/creating your post/page, select the Text(HTML) mode of the editor Simply paste the embed code As noted by PayteR, this will … Read more

Load post content into iframe

Not sure, but I think ajax solution would be more apropriate. But anyways, if I understand this corectly, you have an archive where full posts are loaded inside iframe. If this is a case you can modify template file (single.php) and remove header and footer take a look at Template Hierarchy for further reading I … Read more

how can i embed wordpress backend in iframe

By default WordPress sends an HTTP header to prevent iframe embedding on /wp_admin/ and /wp-login.php: X-Frame-Options: SAMEORIGIN That’s a security feature. If you want to remove this header remove the filters: remove_action( ‘login_init’, ‘send_frame_options_header’ ); remove_action( ‘admin_init’, ‘send_frame_options_header’ ); But you should really use the multisite feature as Tom J Nowell suggested.

How to add editor-style.css styling to wp_editor on front end for comments

Actually you can include the editor-style.css (or any other stylesheet), just pass a “content_css” value to tinymce that points to a css file: wp_editor( $content, ‘editablecontent’, array( ‘tinymce’ => array( ‘content_css’ => get_stylesheet_directory_uri() . ‘/editor-styles.css’ ) ); So the original posters code would look like: add_filter( ‘comment_form_defaults’, ‘custom_comment_form_defaults’ ); function custom_comment_form_defaults( $args ) { if … Read more

Add post class to the TinyMCE iframe?

The filter you’re after is tiny_mce_before_init. Using this, we can hook into TinyMCE’s ‘init_array’ and add body classes: add_filter( ‘tiny_mce_before_init’, ‘wpse_235194_tiny_mce_classes’ ); function wpse_235194_tiny_mce_classes( $init_array ){ global $post; if( is_a( $post, ‘WP_Post’ ) ){ $init_array[‘body_class’] .= ‘ ‘ . join( ‘ ‘, get_post_class( ”, $post->ID ) ); } return $init_array; } We’re joining the post … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)