Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Page Profile User wp codex

Page Profile User wp codex Created By Brahim Lachgar (Macdawne) http://bralach.com

<?php /*Template Name:profile */?>

<?php get_header();?>

<?php $current_user = wp_get_current_user();
if ( 0 == $current_user->ID ):
	else:?>

<?php include(get_template_directory().'/navbar.php');?>




<div class="profile">



<?php 


 if(empty($current_user->BannerAuthor)):?>
<div class="col-xs-12">
<img class="Banner-x  img-responsive" 
src="<?php bloginfo('template_url');?>/images/Banner-x.png" 
width="1024"
height="300"/>
</div>
  <?php else : ?>
<div class="col-xs-12">
<img class="Banner-x   img-responsive" 
src="<?php echo $current_user->BannerAuthor;?>" 
width="1024"
height="300"/>
</div>
<?php endif;?>







<div class="container">
      <div class="row">

        <div class="col-xs-12" >
   <span class="col-xs-4  btn btn-primary btn-sm"><?php echo  $current_user->user_firstname .'-'. $current_user->user_lastname;?></span>
   <span class="col-xs-4 btn btn-default btn-sm">
  <a href="<?php echo get_edit_user_link();?>"> Edit Profil Page </a>
</span>
   <span class="col-xs-4 btn btn-danger btn-sm">Registred:<?php echo $current_user->user_registered;?>
   </span>
   <br>
          <div class="panel panel-info">
            <div class="panel-heading">
              <h3 class="panel-title"><?php echo  $current_user->user_login .'-Level:'. $current_user->user_level;?></h3>
            </div>
            <div class="panel-body">
              <div class="row">
                <div class="col-md-3 col-lg-3 " align="center"> 
<img  class="avatar img-responsive" 
src="<?php echo esc_url( get_avatar_url( $current_user->ID )); ?>" /> 
          </div>
                
             
                <div class=" col-md-9 col-lg-9 "> 
                  <table class="table table-user-information">
                    <tbody>
<tr>
<td>Description</td>
<td><?php echo "<i class='fa fa-pencil'></i>" 
 .$current_user->description ;?></td>
</tr>
                
<tr>
<td>Home Address</td>
<td><?php echo $current_user->City;?>-<?php echo $current_user->Country;?></td>
</tr>
<tr>
<td>Email</td>
<td><a href="mailto:<?php echo  $current_user->user_email;?>"><?php echo  $current_user->user_email;?></a></td>
</tr>
</tbody>
</table>
                  

<?php 
if(empty($current_user->facebook)):
  else:?>
<div class="btn btn-facebook btn-md col-xs-1" > 
  <a href="<?php echo $current_user->facebook;?>" 
  target="target" 
  title="facebook" 
  alt="btn facebook url">
  <i class="fa fa-facebook fa-fw fa-3x"></i>
</a> 
</div>
<?php endif;?>


<?php 
if(empty($current_user->instagram)):
  else:?>
<div class="btn btn-instagram btn-md col-xs-1" > 
  <a href="<?php echo $current_user->instagram;?>" 
  target="target" 
  title="instagram" 
  alt="btn instagram url">
  <i class="fa fa-instagram fa-fw fa-3x"></i>
</a> 
</div>
<?php endif;?>


<?php 
if(empty($current_user->linkedin)):
  else:?>
<div class="btn btn-linkedin btn-md col-xs-1" > 
  <a href="<?php echo $current_user->linkedin;?>" 
  target="target" 
  title="linkedin" 
  alt="btn linkedin url">
  <i class="fa fa-linkedin fa-fw fa-3x"></i>
</a> 
</div>
<?php endif;?>

<?php 
if(empty($current_user->myspace)):
  else:?>
<div class="btn btn-primary btn-md col-xs-1" > 
  <a href="<?php echo $current_user->myspace;?>" 
  target="target" 
  title="myspace" 
  alt="btn myspace url">
  <i class="fa fa-users fa-fw fa-3x"></i>
</a> 
</div>
<?php endif;?>

<?php 
if(empty($current_user->pinterest)):
  else:?>
<div class="btn btn-pinterest btn-md col-xs-1" > 
  <a href="<?php echo $current_user->pinterest;?>" 
  target="target" 
  title="pinterest" 
  alt="btn pinterest url">
  <i class="fa fa-pinterest fa-fw fa-3x"></i>
</a> 
</div>
<?php endif;?>

<?php 
if(empty($current_user->soundcloud)):
  else:?>
<div class="btn btn-soundcloud btn-md col-xs-1" > 
  <a href="<?php echo $current_user->soundcloud;?>" 
  target="target" 
  title="soundcloud" 
  alt="btn soundcloud url">
  <i class="fa fa-soundcloud fa-fw fa-3x"></i>
</a> 
</div>
<?php endif;?>

<?php 
if(empty($current_user->tumblr)):
  else:?>
<div class="btn btn-tumblr btn-md col-xs-1" > 
  <a href="<?php echo $current_user->tumblr;?>" 
  target="target" 
  title="tumblr" 
  alt="btn tumblr url">
  <i class="fa fa-tumblr fa-fw fa-3x"></i>
</a> 
</div>
<?php endif;?>


<?php 
if(empty($current_user->twitter)):
  else:?>
<div class="btn btn-twitter btn-md col-xs-1" > 
  <a href="<?php echo $current_user->twitter;?>" 
  target="target" 
  title="twitter" 
  alt="btn twitter url">
  <i class="fa fa-twitter fa-fw fa-3x"></i>
</a> 
</div>
<?php endif;?>


<?php 
if(empty($current_user->youtube)):
  else:?>
<div class="btn btn-youtube btn-md col-xs-1" > 
  <a href="<?php echo $current_user->youtube;?>" 
  target="target" 
  title="youtube" 
  alt="btn youtube url">
  <i class="fa fa-youtube fa-fw fa-3x"></i>
</a> 
</div>
<?php endif;?>


<?php 
if(empty($current_user->wikipedia)):
  else:?>
<div class="btn btn-wikipedia btn-md col-xs-1" > 
  <a href="<?php echo $current_user->wikipedia;?>" 
  target="target" 
  title="wikipedia" 
  alt="btn wikipedia url">
  <i class="fa fa-pagelines fa-fw fa-3x"></i>
</a> 
</div>
<?php endif;?>

</div>
</div>
</div>

<div class="panel-footer">

<div class="col-xs-12">	
<span>
<a href="<?php echo wp_logout_url(urlencode($GLOBALS['HTTP_SERVER_VARS']['REQUEST_URI'])); ?>" 
	class="logout1 btn btn-danger btn-lg">
  <i class="fa fa-sign-out"></i>
Sign Out
</a>

  <a href="<?php echo get_edit_user_link();?>" 
  target="target"
  class="logout1 btn btn-success btn-lg">
  <i class="fa fa-pencil"></i>
  Edit
  </a> 

 <a href="<?php echo esc_url( home_url('/'));?>" target="target"
    class="logout1 btn btn-secondary btn-lg">
    <i class="fa fa-home"></i>
  Home
</a> 

 <a href="<?php echo esc_url( home_url('/author/'.$current_user->user_login));?>" target="target"
    class="page-official btn btn-info btn-lg">
    <i class="fa fa-home"></i>
  My official page
</a>

<?php

 global $current_user;

  if( !empty($current_user->roles) ):
    foreach ($current_user->roles as $key => $value) :
      if( $value == 'administrator' ):?>
         <a href="<?php echo esc_url( home_url('/wp-admin'));?>" 
  target="target"
    class=" btn btn-warning btn-lg">
    <i class="fa fa-user"></i>
  Admin</a>
     <?php  endif;
    endforeach;
  endif;?>

</span>
</div>

</div><!------------------------End Panel-Footer-------------->
            
</div>
</div>
</div>
</div>





</div><!------------------------End Profile Class-------------->
 <?php endif;?>