show user id
// Add Shortcode function custom_shortcode( $atts , $content = null ) { $user_id = get_current_user_id(); if ($user_id == 0) { echo 'You are currently not logged in.'; } else { echo 'You are logged in as user '.$user_id; } } add_shortcode( 'dataself', 'custom_shortcode' );