Forums

Display archives by category with count in a table (3 posts)

  1. abelcreative
    Member
    Posted 4 years ago #

    I'd like to display the archives/categories/category count in a table like so:

    <table>
    <caption>Caption here</caption>
    <thead>
    <tr>
    <td></td>
    <th id="January">January</th>
    <th id="February">February</th>
    <th id="March">March</th>
    </tr>
    </thead>

    <tbody>
    <tr>
    <th>News Category</th>
    <td>150</td>
    <td>160</td>
    <td>40</td>
    </tr>
    <tr>
    <th>Media Category</th>
    <td>3</td>
    <td>40</td>
    <td>30</td>
    </tr>
    <tr>
    <th>Sports Category</th>
    <td>10</td>
    <td>00</td>
    <td>10</td>
    </tr>
    </tbody>
    </table>

    Is this possible to setup in the loop with wp_get_archives?

  2. jonimueller
    Member
    Posted 4 years ago #

    I don't think so. And I just cannot help myself. I have to ask. Why? Tables are for tabular data. Not really for presenting lists like this. So just wondering the logic of it.

  3. abelcreative
    Member
    Posted 4 years ago #

    Actually, a great question! I'm looking for a way to show posts in categories as graphs/charts, this seemed like a good start:

    http://www.filamentgroup.com/lab/creating_accessible_charts_using_canvas_and_jquery/

    Just wasn't exactly sure how to get the data into a tabular format.

Topic Closed

This topic has been closed to new replies.

About this Topic