WordPress.org

Support

Support » How-To and Troubleshooting » let's differently color list bookmarks items

let's differently color list bookmarks items

  • 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>
    ....
  • The topic ‘let's differently color list bookmarks items’ is closed to new replies.