Hi snowme
Sorry I’m not using Simple Share Buttons Adder plugin.
Have you tried to ask the following support forums?
https://wordpress.org/support/plugin/simple-share-buttons-adder
Thank you.
Thread Starter
snowme
(@snowme)
I tried contacting them but haven’t gotten a response back. The issue also occurs with my Lost Password link in the Sidebar which comes from the Meta Widget Customizer plugin. Since the problem happens with 2 different plugins, I’m assuming it’s creating the URL from some variable.
Please try
add functions.php
add_filter( 'lostpassword_redirect', 'my_redirect_home' ,999);
function my_redirect_home( $lostpassword_redirect ) {
return home_url();
}
Thread Starter
snowme
(@snowme)
I tried adding your code to my functions.php but the Lost Password link still seems to add in the latest post to the redirect URL.
Before inform you to the code
install Meta Widget Customizer
lostpassword link below
http://www.example.com/wp/wp-login.php?action=lostpassword&redirect_to=http://www.example.com/wp/archives/29173
detect redirect_to last post.
functions.php
add filter code.
click lostpassword link
input email address, submit
then redirect to http://www.example.com/wp/
It seems redirect correct for me.
Thank you.
if I’m misunderstanding the contents of your question, please explain only briefly possible.
Thread Starter
snowme
(@snowme)
Your code works to redirect to home page after resetting the password but it doesn’t change the actual link.
When I hover over the lost password link, it still includes the latest post in the link.
http://www.labsrc.com/letmein?action=lostpassword&redirect_to=http://www.labsrc.com/bluetooth-triple-booting/
How do I remove the /bluetooth-triple-booting from the link.
plugin meta-widget-customizer.php
line:252
if (!empty($data['lostpassword']) && (!is_user_logged_in())) {
?>
<li><a href="<?php echo wp_lostpassword_url(get_permalink()); ?>" title="Lost Password">Lost
Password</a></li><?php
}
I feel good below.
if (!empty($data['lostpassword']) && (!is_user_logged_in())) {
if ( isset( $post->ID ) && is_singular() ) {
?><li><a href="<?php echo wp_lostpassword_url(get_permalink()); ?>" title="Lost Password">Lost Password</a></li><?php
} else {
?><li>lost1<a href="<?php echo wp_lostpassword_url(home_url()); ?>" title="Lost Password">Lost Password</a></li><?php
}
}
However, since I do not use this plug-in, I do not know what this change is really good.
Issue : In loop page, Plugin get_permalink () is used, it is redirected to the last post of the loop.
I think that good to try to put out a request to the author of the plug-in
Thread Starter
snowme
(@snowme)
Sorry for taking so long to reply. Thank you again for finding the problem for me. I appreciate the great support you provide. I’ll contact the plugin author about it.