Support

Account

Home Forums General Issues Using Category Color Picker Value In Home Loop Reply To: Using Category Color Picker Value In Home Loop

  • In the loop over the posts you must get the post category and then get the field from that category.

    
    while(have_posts()) {
      the_post();
      $categories = wp_get_post_categories($post->ID);
      $color = get_field('color_field_name', $categories[0]);
    }