Disqus sso wordpress pop up window not closing after login

I am using disqus sso for wordpress. I am trying it on my local host. I am able to get the wordpress login window in a new screen. This is the one thing(wordpress’ login window) i want to get rid off but before that, i tried that the window should get closed after the user logs in. I am using wordpress 3.6 version and the gadgetry parent theme.

I tried coding below javascript in the header.php of the parent theme but it did not work.

Read More
<script type="text/javascript">
// <![CDATA[
if ( window.opener != null && !window.opener.closed ) {
    window.close();
}
// ]]>
</script>

Please let me know if i am doing something wrong here.

Related posts

Leave a Reply

1 comment

    1. Open up wp-login.php, and copy everything in it.
    2. Paste the code from wp-login.php into a new page, and call it disqus_sso.php
    3. Look for the submit button code (line 706) in the new
      disqus_sso.php page
      “/> and add the
      following onclick event to it onclick=”setTimeout(function () {
      window.close() }, 600);”
    4. Your new submit button code should be:
      ” onclick=”setTimeout(function () {
      window.close() }, 600);”/>
    5. Save disqus_sso.php and upload it to your wordpress site root where the original wp-login.php was.
    6. open up disqus.php from disqus-comment-system plugin with your
      editor (I use notepad ++ ), and look for url:
      “‘.$siteurl.’/wp-login.php”, (line 1410). Change wp-login.php to
      disqus_sso.php, so the resulting line looks like the following: url:
      “‘.$siteurl.’/disqus_sso.php”, Save disqus.php, and upload it
      back to your plugin.

    source

    http://www.yabood.com/fix-for-disqus-sso-popup-on-wordpress/