Home › Forums › Front-end Issues › Custom fields from custom types through the location rules › Reply To: Custom fields from custom types through the location rules
Hi, thank you for your support.
For your questions:
1) yes
2) yes
3) yes
However, this code works!
<?php
$zone_articoli = get_field('zona_per_i_pacchetti');
$args = array(
'post_type'=>'pacchetto',
'meta_key'=>'zona_per_gli_articoli',
'meta_value'=>$zone_articoli
);
$loop = new WP_Query($args);
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<div>
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div>
<?php endwhile; wp_reset_postdata();?>
A last question:
If i want use a multiple select for a field, how i can do it?
The field that i want use is ‘zona_per_gli_articoli’
Thank you so much for your help!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.