Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Get back to my blog

By: valuser on Dec 24th, 2012  |  syntax: None  |  size: 0.71 KB  |  views: 61  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <div id="myveryownblog">
  2. <?php if ( is_user_logged_in()) : ?>
  3. <?php global $current_user; get_currentuserinfo(); $user_id =  $current_user->ID ; $user_blogs = get_blogs_of_user( $user_id ); $key = 'primary_blog'; $single = true; $primary_blog = get_user_meta( $user_id, $key, $single); foreach ($user_blogs AS $user_blog) {$user_blog->siteurl; break;} $link = $user_blog->siteurl;$title = "My Very Own Blog"; $var  = "<a href='$link' style='font-weight:normal; font-size:12px;color: #E04BF1;padding-left: 8px;' title ='My Very Own Blog'><img src='http://mydomain.dev/wp-content/themes/mytheme/images/myveryownblog.jpg' ALIGN = 'LEFT'>$title</a>";if ($primary_blog == "") {echo " ";} else {echo "$var";} ?>
  4. <?php endif; ?>
  5. </div>