Is there a way to make the user chose the website url that will load by default after login?

Can plug-ins what that is ? place some sort of element of the plugin on the pages, and the user is tapping it on one of the pages makes it the first at boot after login ? Or maybe there are other solutions to this problem ?
March 19th 20 at 09:06
1 answer
March 19th 20 at 09:08
There is no need for the plugin, everything is trivial.

Add an element to the page on which the user clicks to the page set as the home as soon as it clicked, get the id of this page in any way, but at least in the data-id of the item store.

Write the received ID field in the user profile.
Well, he redirect - so
 * @param $redirect_to
 * @param $request
 * @param $user
 * @return false|string

wpp_user_redirect function( $redirect_to, $request, $user ) {

 $user_id = get_current_user_id();
 $page = get_user_meta( $user_id, 'field_key', true );

 if ( ! empty( $page ) ) {
 return get_the_permalink( (int) $page );

 return $redirect_to;

add_filter( 'login_redirect', 'redirect_admin', 10, 3 );

Terms for taxonomies, just add if it need

This is an example on fingers, and you have any to add.
Unfortunately, my "level" of knowledge in the programming only allows you to use ready-made code indicating what code in which file insert (. Because actually asking for a turnkey solution in the form of a plugin. - wilburn.Wiza commented on March 19th 20 at 09:11
WP Panda, and you could help me more details ? I understand I need to obtain an id page when you click, and the code you gave me will do the rest with the received ID ?
well, in General, formed three questions.
1. what code element to retrieve the id of a page by clicking on it.
2. how to implement this item ? "Write the received ID field in the user profile". what code and in which file.
3. The code that you indicated you want to add to the file functions.php ? - wilburn.Wiza commented on March 19th 20 at 09:14

Find more questions by tags WordPress