Skip to content

“Add to my LJ” button

There is an excerpt from WordPress' single post template implementing the button "Add to my LJ". You can see an example at the bottom of this record, at the right of similar social buttons.

<a title="Add to my LJ" href="<?php echo urlencode(strip_tags(get_the_excerpt(), '<a><strong>')); 
echo urlencode('<br/><a href="' . get_permalink() . '">Read the full story</a>');
?>&amp;subject=<?php echo urlencode(get_the_title()); ?><?php 
$out = array();
if (function_exists('get_the_tags')) { 
  $tags = get_the_tags();
  if ( !empty( $tags ) ) {
    foreach ( $tags as $t ) {
      $out[] = $t->name;
$out[] = get_bloginfo();
echo '&prop_taglist=' . urlencode(join(',', $out));
?>"><img border="0" src=""/></a>

Leave a Reply

Your email address will not be published.