How do I insert a   tag outside the   tag on my main menu I have been scouring the web trying to find a way to get a  tag just AFTER each of my main menu items. Looking at this solution I am able to get a  tag in there, but it's INSIDE the link. I just don't want it to be a link.

I'm pulling my hair out trying to figure this out. I just don't know enough PHP to place it outside the link. This is what I have so far in my template.php:

function motg_menu_link(array $variables) {
  $element = $variables['element'];
  $sub_menu = '';
  $element['#localized_options']['html'] = TRUE;


if ($element['#below']) {
$sub_menu = drupal_render($element['#below']);
}

if ($element['#original_link']['menu_name'] == "main-menu"){

$element['#title'] .= '&lt;span class="description"&gt;'.$element['#localized_options']['attributes']['title'].'&lt;/span&gt;';
}

$output = l($element['#title'], $element['#href'], $element['#localized_options']);
return '&lt;li' . drupal_attributes($element['#attributes']) . '&gt;' . $output . $sub_menu . "&lt;/li&gt;\n";
}


Any help would be great!
If you want your menu link to be like this &lt;li&gt;&lt;a&gt;Link 1&lt;/a&gt;&lt;span&gt;Description&lt;/span&gt;&lt;/li&gt;, ie., the description is outside the &lt;a&gt; tags, then try the code below.

function motg_menu_link(array $variables) {
  $element = $variables['element'];
  $sub_menu = '';
  $element['#localized_options']['html'] = TRUE;


  if ($element['#below']) {
    $sub_menu = drupal_render($element['#below']);
  }

  if ($element['#original_link']['menu_name'] == "main-menu" &amp;&amp; isset($element['#localized_options']['attributes']['title'])){
    $description = '&lt;span class="description"&gt;' . $element['#localized_options']['attributes']['title'] . '&lt;/span&gt;';
  }

  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
  return '&lt;li' . drupal_attributes($element['#attributes']) . '&gt;' . $output . $sub_menu . $description."&lt;/li&gt;\n";
}


The reason your code didn't work was, you used the description tag within the l() function. In drupal the l() function always renders an &lt;a&gt; tag and so the description was inside the &lt;a&gt; tag.