How to check wordpress blog user is logined in

Question:

I am making a wordpress theme, and want to show some buttons when wordpress user is logined, so how to know he is loggined in or not.

Answer:

We can use WordPress is_user_logged_in function to check he is loggined in or not.

for example:

<?php
if(is_user_logged_in()){
} else {
}
?>

,