Support

Account

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!