Support » Plugin: Colorful Categories » How to get a color for a specific category?

  • FAQ says:

    Use WordPress default function: get_term_meta($term_id, ‘cc_color’, true);

    Should be (based on my installation):

    Use WordPress default function: get_term_meta($term_id, ‘color’, true);

    cc_ prefix is not existent.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Gesundheit Bewegt GmbH

    (@loyaltymanufaktur)

    Hello JRyven,

    Unfortunately, this plugin is not using the key “color” for the terms.

    Quite odd! I am observing that, when I installed the plugin and used the line provide by the FAQ, my installation returned NULL: get_term_meta($term_id, ‘cc_color’, true);

    I went to phpMyAdmin and found that the term key was not ‘cc_color,’ but was simply ‘color.’

    My installation of WordPress was current and unaltered in any way (aside from having a few other plugins).

    Using the term key without the prefix returns the stored data: get_term_meta($term_id, ‘color’, true);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get a color for a specific category?’ is closed to new replies.