• I’m using wp_list_categories to display a list of categories in my sidebar. I’ve changed the title_li parameter to an <h2> heading to match my site’s other widget titles.

    This is the HTML output as it is currently formatted:

    <div class="text-widget">
          
           <li>	
             
           <h2 class="widget-title">Category List Title</h2>
    	   
               <ul>
    	        <li>category 1</li>
    	        <li>category 2</li>
    	   </ul>
          
           </li>
    
    </div>

    I would like to change it to the following structure:

    <div class="text-widget">
          
           <h2 class="widget-title">Category List Title</h2>
    	   
               <ul>
    	        <li>category 1</li>
    	        <li>category 2</li>
    	   </ul>
               
    </div>
  • The topic ‘How to customize HTML output for category list?’ is closed to new replies.