I created link to user’s profile by code:
<?php
global $current_user;
get_currentuserinfo();
//echo '<pre>';
//print_r($current_user);
?>
<ul class="hd-account">
<?php $first_name = $current_user->user_firstname; $last_name = $current_user->user_lastname;?>
<li><a href="<?php echo home_url().'/forums/profile/'.$current_user->user_login.'/'; ?>">Xin chào, <?php if ($first_name == '' || $last_name == '' ) echo $current_user->display_name; else echo $first_name.' '.$last_name; ?></a></li>
<li><a href="<?php echo wp_logout_url(home_url()); ?>">Thoát</a></li>
</ul>
I create this in theme’s header.php (not TwentyEleven …). Example, I have a link like that http://localhost/cars/forums/profile/namnguyen/. I click it and get an error “404 not found”, I don’t know why. Can someone help me?