Support

Account

Forum Replies Created

  • Yes, I saw that. I must not have used it correctly. If you don’t mind looking at it the current code is below> Thanks again.

    <?php $args = array(
    ‘post_type’ => ‘properties’,
    ‘tax_query’ => array(
    array(
    ‘posts_per_page’ => -1,
    ‘taxonomy’ => ‘property_type’,
    ‘field’ => ‘slug’,
    ‘terms’ => ‘retail’
    ),
    ),
    );

    $query = new WP_Query( $args );
    while ( $query->have_posts() ) : $query->the_post(); ?>

    <?php
    $term = get_queried_object();
    $property_address = get_field(‘property_address’,$term);
    echo $property_address;
    ?>

    <?php the_title();?>
    <h2 class=”prop-address”><?php the_field(‘property_address’); ?></h2>
    <p class=”prop-description”><?php the_field(‘property_description’); ?></p>

    <?php endwhile; ?>

  • Hey HimSelf, thanks for your help on this.

    Sorry, but I don’t know how to add a $term to the custom field. Some of the articles I’ve viewed show a Taxonomy Term option in the Field Type dropdown, but my version of ACF does not have that option (see attached screencapture).

    I did notice a ‘Create Terms’ toggle at the bottom of that screenshot, but cannot find documentation on how to use it. Any advice?

    Thank you again for your reply. I really appreciate your help.

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