title: How to output wp_list_categories with extra markup
body: <p>I'm currently using the below script to output all my wordpress categories in an unordered list. How can I have the output with extra markup?</p>
  
  <pre><code>&lt;ul&gt;&lt;?php wp_list_categories('title_li&amp;show_count=1');?&gt;&lt;/ul&gt;
  </code></pre>
  
  <p>For example:</p>
  
  <pre><code>&lt;ul&gt;
  &lt;li&gt;Category 1 &amp;rsaquo;&lt;/li&gt; 
  &lt;li&gt;Category 2 &amp;rsaquo;&lt;/li&gt; 
  &lt;/ul&gt;
  </code></pre>
  
  <p>Instead of </p>
  
  <pre><code>&lt;ul&gt;
  &lt;li&gt;Category 1&lt;/li&gt; 
  &lt;li&gt;Category 2&lt;/li&gt; 
  &lt;/ul&gt;
  </code></pre>
  
  <p>Edit: Changed it to the following with the help of Obmerk Kronen:</p>
  
  <pre><code>$args = array(
    'orderby' =&gt; 'name',
    'order' =&gt; 'ASC',
    'number' =&gt; 20, // how many categories
    );
  $categories = get_categories($args);
    foreach($categories as $category) { 
      echo '&lt;li&gt;&lt;a href="' . get_category_link( $category-&gt;term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category-&gt;name ) . '" ' . '&gt;' . $category-&gt;name.'&lt;/a&gt;&amp;rsaquo;&lt;/li&gt;';
      } 
  </code></pre>