Viewing 1 replies (of 1 total)
  • Sona

    (@support-web-dorado)

    @hannakost,

    You can do so using the following code:

    $args = array(
               'hierarchical' => true,
               'get' => 'all'
           );
    
           $terms = get_terms("ecwd_event_category", $args);
           $colors = array();
           foreach ($terms as $term){
             $cat_option = get_option('ecwd_event_category_' . $term->term_id);
             $colors[$term->term_id] = $cat_option['color'];
           }

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]

    Where in args you can include your own arguments. Note that $cat_option hosts category color and image.

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Get event category color’ is closed to new replies.