Wp_logout Issue with Domain Mapping
-
I’m using a multisite and I set my site up at parentsite.com/mysite. My theme has a logout button (not in the admin bar) and when it 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=""><?php _e('Log out', 'franklin') ?></a>
Then I bought a new domain name (mysite.com) for the site, installed this plugin and set up the A name to point to parentsite.com/mysite. Everything works fine except instead of the logout button bringing them to the homepage of mysite.com it brings them to the homepage of parentsite.com with this in the url:
https://parentsite.com/?dm=cd427564d8195660acb35d2669c96069&action=logout&blogid=8&k=87e709a6777fa366cd42edc1c52f1db9&t=1751394297
I’ve tried changing the code to:
<a class="logout with-icon" href="<?php echo wp_logout_url('https://mysite.com') ?>" data-icon="?"><?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('https://parentsite.com/mysite') ?>" data-icon="?"><?php _e('Log out', 'franklin') ?></a>
and
<a class="logout with-icon" href="<?php echo wp_logout_url( home_url() ); ?>" data-icon="ð
Any ideas?
https://www.ads-software.com/plugins/wordpress-mu-domain-mapping/
- The topic ‘Wp_logout Issue with Domain Mapping’ is closed to new replies.