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

Code for redirecting to the current page after WordPress login

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

Login

Replace the current login code with the code above to achieve redirection 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 instead.

「Naibabiji WordPress Website Building Coaching」 — From selecting a domain and purchasing hosting to installing themes and publishing posts, I「ll guide you through every step, helping you avoid detours and reach your goals directly.

👉 Learn about 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 to Follow