WordPress Get Current User ID

WordPress Get Current User ID

This useful PHP code snippet shows you how to use a WordPress function to get the current user id. This code shows creating the user id as a PHP string variable and displaying it using echo.   PHP <?php $the_user_id = get_current_user_id(); echo...