Hi @rdtaal,
I’m glad you’re enjoying the plugin! To do this we’ll need to add a filter function. What roles would you like to be sent to the admin after logging in?
Let me know.
Cheers,
Kevin.
Thread Starter
rdtaal
(@rdtaal)
Hi Kevin,
The role after logging in is an Editor.
b.t.w. some text is not yet translated automatically
see this link
Where can i translate them?
p.s. if you want i can translate the settings page to Dutch aswell for you.
Kind regards,
Rob
Hey Rob,
We can push a plugin update in the next few days to try to improve the i18n of the plugin (i.e. making more strings available to be translated).
To set up an editor redirect, you can use a filter function like this:
add_filter( 'yikes-custom-login-login-redirect-url', 'yikes_redirect_editors_to_admin_dashboard', 10, 3 );
function yikes_redirect_editors_to_admin_dashboard( $redirect_url, $request_page_id, $current_user ) {
if ( isset( $current_user->roles ) && in_array( 'editor', $current_user->roles ) ) {
return admin_url();
}
return $redirect_url;
}
Are you familiar with adding filter functions to your website?
Let me know.
Cheers,
Kevin.
Hi Rob,
I took a look at the code and the error message in your screenshot is setup as translatable. Do you not see that string when translation? How are you doing your translations?
Let me know.
Cheers,
Kevin.
Thread Starter
rdtaal
(@rdtaal)
Hi Kevin,
Thanks for the filter function code, works like a charm!
So far i was looking here to find your plugin to translate
https://translate.wordpress.org/locale/nl/default/wp-plugins?s=Custom+WP+Login+
Let me know if i can be of any help.
Best Regards,
Rob
Thread Starter
rdtaal
(@rdtaal)
Hi Kevin,
Consider it done 😉
Best Regards,
Rob