Plugin Author
finnj
(@finnj)
Hi,
No specific page, it is the Frontier Post page.
If you want to change the text, you can cheat by making a translation change – ex. Use POEdit
How can users login from the frontend?
Is it possible to let the “please log in” text link to the login page?
Thanks
christophe
Plugin Author
finnj
(@finnj)
I am using the plugin: Theme My Login
About adding a login link, I will consider to add this as an option
Thread Starter
matuh
(@matuh)
I changed the text by translating, but where does it take the —- signs before and after the text? They were not in the translation file.
But is there any way to add also a page with some text and login form?
Plugin Author
finnj
(@finnj)
Added option for this in 2.1.0
New setting
Please make the login link redirect back to the my-posts page after login. It’s dumping users into the backend, which will only cause confusion and defeat the purpose of using the frontend in the first place. I made the change locally, but would love to have it be permanent. Thanks! 🙂
Plugin Author
finnj
(@finnj)
I can see your point.
I am using Theme My Login plugin to handle login.
Can I ask how you did the change locally.
I only did a quick proof of concept and did not take the time to code it properly, but I went to frontier-post.php around line 102 in the code and added the redirect portion of the link. Something like this:
if ($frontier_show_login == "true" )
echo __("Please log in !", "frontier-post")." <a href=".wp_login_url()."?redirect_to=http%3A%2F%2FEXAMPLE.COM%2Fmy-posts%2F&reauth=1>".__("Login Page", "frontier-post")."</a> ";
else
_e("Please log in !", "frontier-post");
Of course, this should not be hardcoded. The base URL and page that the frontier shortcode resides at should be done programmically, I just didn’t take the time to do this. But you can see the gist of it at least.
This is probably a better way to code this:
echo __("Please log in !", "frontier-post")." <a href=".wp_login_url()."?redirect_to=".get_permalink(get_option('frontier_post_page_id')).">".__("Login Page", "frontier-post")."</a> ";
One other quick suggestion would be to add a logout link or button at the bottom in case the admin bar is not displayed and to make it more obvious to log out when finished.
Plugin Author
finnj
(@finnj)
Things are easy when you know how to do them, thanks I will implement in next release
I wasnt aware of the rediect_to parameter
As for the logout, I would suggest using a widget link for that – I am using Theme My Login
Plugin Author
finnj
(@finnj)
Implemented v 2.1.2 – Thanks