Horje
How to Show the Logged in Username in the WordPress Code Example
How to Show the Logged in Username in the WordPress
function show_loggedin_function( $atts ) {

	global $current_user, $user_login;
	get_currentuserinfo();
	
	add_filter('widget_text', 'do_shortcode');
	if ($user_login) 
		return '<h4 class="logged-in-user">Hi ' . $current_user -> display_name . ' !</h4>';
	else
		return '<a rel="nofollow" href="' . wp_login_url() . ' ">Login</a>';
	
}
add_shortcode( 'show_loggedin_as', 'show_loggedin_function' );

//Shortcode
[show_loggedin_as]




Php

Related
laravel relationship Code Example laravel relationship Code Example
php 5.6 xampp Code Example php 5.6 xampp Code Example
how to pass javascript variable to php Code Example how to pass javascript variable to php Code Example
octobercms mail register Code Example octobercms mail register Code Example
keep track of view count php Code Example keep track of view count php Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11