Support

Account

Forum Replies Created

  • Ok, I don’t know why, but it’s working as expected now.

    It must have been a cache issue, but I swear I was clearing the cache regularly.

    For the sake of closure, here’s the code that worked (once the field was accessible):

    
    <section class="center-align stories" id="stories">
      <div class="wrap cf">
        <div class="row">
          <?php
            if (have_posts()) : while (have_posts()) : the_post();
              $my_id = get_the_ID();
          ?>
            <?php // Only show posts where 'visibile_on_index' is not 0 (either 1 or unset)
              if (get_post_field('visible_on_index', $my_id) != 0) { ?>
              <div class="fourth <?php foreach(get_the_category() as $cat){ echo ' '.$cat->slug; }?>">
                <div class="inner">
                  <a href="<?php the_permalink(); ?>" class="img-holder" style="background-image: url(<?php the_post_thumbnail_url('full'); ?>)"></a>
                  <a href="<?php the_permalink(); ?>">
                    <h4><?php the_title(); ?></h4>
                  </a>
                  <?php the_excerpt(); ?>
                </div>
              </div>
            <?php }; ?>
          <?php endwhile; ?>
          <?php bones_page_navi(); ?>
          <?php endif; ?>
        </div>
      </div>
    </section>
    
  • Have you added the field afterwards?
    No, field was added before I started trying to use it on the archive page.

    Have you re-saved the posts then?
    Yes, I can see the field on the Admin side when I edit a post (and on the index view since I’m also using the ACF QuickEdit fields plugin).

    Are the other fields coming from a different field group or are they in the same group?
    They are in a different group. I tried creating the field in a group that *does* appear using get_fields(), but no change. I checked settings between this group (that doesn’t appear) and a group that does appear and all settings are the same.

Viewing 2 posts - 1 through 2 (of 2 total)