Hello,
I’m using the taxonomy field to retrieve a selected category ID but the selection is not being saved after selecting it.
This is part of my code:
$catgrid = get_field('cat_grid');
?> <div id="custom-featured-2" class="custom-featured-2">
<div class="wrap">
<h2><?php echo get_field('cat_grid_title'); ?></h2>
<?php $catquery = new WP_Query( 'cat=' . $catgrid . '&posts_per_page=12' ); ?>
<ul>
<?php while($catquery->have_posts()) : $catquery->the_post(); ?>
<li><div class="entry">
<?php if ( has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
<?php echo the_post_thumbnail ('thumbnail'); ?>
</a>
<?php endif; ?>
<h4><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h4>
</div></li>
<?php endwhile; ?>
</ul>
</div>
</div>
<?php wp_reset_postdata();
And these are my field settings:
What am I doing wrong here?