WordPress.org

Ready to get started?Download WordPress

Forums

customize wp_list_categories() output (1 post)

  1. 3v1l5w1n
    Member
    Posted 5 years ago #

    Hey guys, I was wondering how would i go about accomplishing the following:

    I have the following categories:

    Cat 1
    Cat 1.1
    Cat 2
    Cat 2.1

    I want this html code

    <div>
    <h2>Cat 1</h2>
    <ul>
    <li><a href="{the link}"><span>Cat 1.1</span></li>
    </ul>
    </div>
    
    <div>
    <h2>Cat 2</h2>
    <ul>
    <li><a href="{the link}"><span>Cat 2.1</span></li>
    </ul>
    </div>

    I would really prefer to customize the html rather than taking my existing css and changing it for the default wp_list_categories() output.

    thank you

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.