Can we set a redirection with dynamic content in url?

If you want to create a link with the user nickname as a part of it I would do something like this <?php // check if user is logged in if (is_user_logged_in()) { // get current user object $current_user = wp_get_current_user(); // get user nickname $user_nickname = $current_user->data->user_nicename; // set the link href $link_href=”www.domain.com/profile/” . … Read more

Get All Results From Other Users That Share The Same Custom User Meta As Current User

You can use get_current_user_id to get the id of the user currently viewing the page, and get_user_meta to get the site_id associated with that user. For example: <?php $user_id = get_current_user_id(); $site_id = get_user_meta($user_id, ‘site_id’, true); Note: This does assume there is a user logged in, you might get unexpected results if there isn’t. So … Read more