WordPress.org

Ready to get started?Download WordPress

Forums

[Hack:] Make WordPress work inside html frames. (1 post)

  1. danuniversal
    Member
    Posted 2 years ago #

    This seems to be a common problem, and I think I should make a special thread to make the solution to this known.

    Hargopal solved this issue 5 years ago here:
    http://wordpress.org/support/topic/no-login-in-ie-in-frame

    I had the same problem, I tried this solution with WordPress 3.3.1 recently, and it worked, I could access to the login page, and admin panel, using frameset.

    Here is the solution:

    You have to edit the file wp-login.php, putting in a p3p license. WordPress 3.3.1 it is exactly in line 43.

    Your original code should be something like this:

    function login_header($title = 'Log In', $message = '', $wp_error = '') {
    	global $error, $is_iphone, $interim_login, $current_site;
    
    	// Don't index any of these forms
    	add_action( 'login_head', 'wp_no_robots' );

    You will have to include the following code there:

    header( "P3P: CP=CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE");

    It should be right before the part that says "//Don't index any of these forms" -the line 43-. So your final code will be something like this:

    function login_header($title = 'Log In', $message = '', $wp_error = '') {
    	global $error, $is_iphone, $interim_login, $current_site;
    header( "P3P: CP=CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE");
    	// Don't index any of these forms
    	add_action( 'login_head', 'wp_no_robots' );

    I hope it work. I have not found any problem yet. If you find any problem, please tell us.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by danuniversal
  • This topic is not a support question
  • WordPress version: 3.3.1