• ioiodesign

    (@ioiodesign)


    • LCP plugin version = v0.89.5
    • WordPress version = v6.4.3

    I failed using the search function on here, it sucks or I’m dumb. Or both. I hope this question has not already been asked, if it has, I apologize in advance. ??

    I created a list of various posts from different categories which is already working great. Now I would like to give each list item a specific icon, depending on the category. Therefore I would like to give the list items a CSS class based on the category names. Is this possible?

    I have already tried to solve this with a template. I have managed to create the required HTML structure of the template. Unfortunately, I don’t know nothing about PHP and failed to find the right string to output the categories in the class=”” tag.

    I would be very grateful for any help. Also, thanks for the awesome plugin!

    • This topic was modified 12 months ago by ioiodesign.
    • This topic was modified 12 months ago by ioiodesign.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor zymeth25

    (@zymeth25)

    There is a feature available via a shortcode parameter tags_as_class but there is none for categories, i.e. categories_as_class. I will save this as a feature request and since this is rather simple to implement, I hope it will be included in the next release.

    Thread Starter ioiodesign

    (@ioiodesign)

    Thank you very much for your reply and your work! The parameters categories_as_class and posttype_as_class suggested in feature request #495 would be super helpful. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Category names as class names for list items’ is closed to new replies.