2

I'm using a multisite and I set my site up at parentsite.com/mysite. When the logout button was clicked it worked correctly and logged the users out and brought them back to the homepage. Here's what the code was:

<a class="logout with-icon" href="<?php echo wp_logout_url( get_permalink() ) ?>" data-icon="&#xf08b;"><?php _e('Log out', 'franklin') ?></a>

Then I bought a new domain name (mysite.com) for the site, installed the "WordPress MU Domain Mapping" plugin and set up the A name to point to parentsite.com/mysite. Everything works fine except now the logout button brings them to the homepage of parentsite.com with this in the url: http://parentsite.com/?dm=cd427564d8195660acb35d2669c96069&action=logout&blogid=8&k=87e709a6777fa366cd42edc1c52f1db9&t=1751394297 instead of the homepage of mysite.com.

I've tried changing the above code to:

<a class="logout with-icon" href="<?php echo wp_logout_url('http://mysite.com') ?>" data-icon="&#xf08b;"><?php _e('Log out', 'franklin') ?></a>

but that didn't help. I've also tried

<a class="logout with-icon" href="<?php echo wp_logout_url('http://parentsite.com/mysite') ?>" data-icon="&#xf08b;"><?php _e('Log out', 'franklin') ?></a>

and

<a class="logout with-icon" href="<?php echo wp_logout_url( home_url() ); ?>" data-icon="&#xf08b;"><?php _e('Log out', 'franklin') ?></a>

Any ideas? This is very frustrating and embarrassing.

Thanks!

  • Do you have any plugins and/or theme functions running that might intervene? What about some jQuery abduction of that link (e.g., $('a.logout').click(...)? – tfrommen Sep 13 '13 at 16:08
  • Please make your question about need to properly configure domain, the issue with logout was answered in your previous question and those details are irrelevant to that. – Rarst Sep 13 '13 at 16:15
  • @Rarst I hear what you're saying but I'm not sure what indicates that it's set up incorrectly. It's working fine for everything else except the logout. When you visit mysite.com you see mysite.com in the url area and the page that is shown is parentsite.com/mysite which is exactly what it should be. All forms submit correctly as well. – user36789 Sep 13 '13 at 16:27
  • Please, move the solution to an Answer in the appropriate box bellow, thanks. – brasofilo Sep 20 '13 at 12:12
3

I asked on the WordPress MU Domain Mapping plugin support page and it turns out it was a setting in the plugin that needed to be turned off. I turned off

Redirect administration pages to site's original domain

and it's working now.

Thanks for your ideas and help!

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.