I want to put a link at the top of my page for the users to access there blog, how would i make that link? because with each user it puts a number at the end of there address like so http://www.pixelgodonline.com/?q=blog/2 <-----Thats the number??? cause they are the second member on my site.

HELP!!

Comments

michelle’s picture

<?php
global $user;
print '<a href="/blog/' . $user->uid .'">My Blog</a>';
?>
sillygwailo’s picture

The following code takes into account any URL aliases that might have been created for an individual's weblog:

global $user;
print l("My Blog", "blog/" . $user->uid);

(Username formerly my full name, Richard Eriksson.)

abhilasha bhardwaj’s picture

can't i access my post block like this way?