🚀 Is building a website too difficult? Let me guide you step by step—Learn about the 「Naibabiji WordPress Website Building Coaching Service」 →

WordPress Redirect to Current Page After Login Code

Naibabiji usesLightning Bo's Paid Reading Plugin. By default, if you have already purchased a paid article and visit the site again, you will be prompted to log in. However, after logging in, you will enter the user center and not be redirected to the article page you were reading. Therefore, we need to modify the plugin to redirect to the currently reading page after login.

<a href="<?php echo wp_login_url( get_permalink() ); ?>" title="Login">Login</a>

By replacing the current login code with the code above, you can achieve a redirect to the current page after login.

Official reference: https://developer.wordpress.org/reference/functions/wp_redirect/

🚀 Still feeling confused after reading the tutorial? Let me guide you step-by-step.

「Naibabiji WordPress Website Building Coaching Service」—From choosing a domain and buying hosting, to installing a Theme and publishing content, I「ll coach you through every step, helping you avoid detours and reach your goal directly.

👉 Learn about the Website Building Coaching Service
🔒

Comments are closed

The comment function for this article is closed. If you have any questions, please feel free to contact us through other channels.

×
二维码

Scan QR Code to Follow

AI Website Building Assistant

🤖
Hello! I am the Naibabiji AI Assistant. How can I help you?
Quick Consultation: