WordPress.org

Ready to get started?Download WordPress

Forums

let's differently color list bookmarks items (1 post)

  1. cesare@dopo
    Member
    Posted 2 years ago #

    Hi,

    I'm using this code

    wp_list_bookmarks('categorize=0&title_li=0&orderby=updated&before=<li>&after=</li> - ');

    to randomly list all my links belonging to different categories.
    It works.

    Now my target is to color these items depending on the category they belong to. Add a specific class to <li> item based on categories could be useful,
    For example:

    <li class="category-slug-3"><a href="#">link</a></li>
    <li class="category-slug-1"><a href="#">link</a></li>
    <li class="category-slug-3"><a href="#">link</a></li>
    <li class="category-slug-1"><a href="#">link</a></li>
    ....

Topic Closed

This topic has been closed to new replies.

About this Topic