• Resolved jamieschmid

    (@jamieschmid)


    I’m trying to add a color to each category name across the site, and I got the calendar events and basic category list working using:

    <li><span class="category-color" style="background-color: #_CATEGORYCOLOR ">#_CATEGORYLINK</span></li>

    But am unable to figure out how to add that markup around the categories list on my event single pages. I have looked through the documentation on the plugin site and the Help page in the plugin itself but can’t find any way to list out single categories so that I can put a span with #_CATEGORYCOLOR around each one.

    So far it seems the only way to list categories for a specific event is:
    #_CATEGORIES
    which outputs:

    <ul class="event-categories">
    <li>
    <a href="mylink">mycategorytitle</a>
    </li>
    <ul>

    is there a way to add the span around each of these list items?

    https://wordpress.org/plugins/events-manager/

Viewing 5 replies - 1 through 5 (of 5 total)
  • caimin_nwl

    (@caimin_nwl)

    Can you repost your code using the code button – I think the original got mangled by the forum. Thanks.

    Thread Starter jamieschmid

    (@jamieschmid)

    sorry! this is the code that works for my general category listings:

    <li>
    <span class="category-color" style="background-color: #_CATEGORYCOLOR ">#_CATEGORYLINK</span>
    </li>
    caimin_nwl

    (@caimin_nwl)

    That should work. If you remove the

    class="category-color"

    part does it work? It could be the category color is being overwritten by something else in your stylesheet.

    Thread Starter jamieschmid

    (@jamieschmid)

    no, the first example does work, but only for listing out all categories.

    I’m asking how to list out a single event’s categories on its single event page; and be able to customize each category link output in that list so I can assign it a background color.

    The only way I can see to list out all categories associated with a single event is by using #_CATEGORIES but that outputs a full unordered list that I can’t customize.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    you need to modify template file at events-manager > templates > placeholders > categories.php

    to use template: http://wp-events-plugin.com/documentation/using-template-files/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘list categories of an event, with #_CATEGORYCOLORS ?’ is closed to new replies.