• im using :

    $bodegas = wp_get_object_terms( get_the_ID(), 'promotores', array( 'fields' => 'ids' ) );
    $bodegas = new WP_Query( array( 'post_type' => 'promotores', 'post__in' => $bodegas, 'orderby' => 'title', 'order' => 'ASC', 'showposts' => -1 ) );
            if ( $bodegas->have_posts() ) :
               while( $bodegas->have_posts() ) : $bodegas->the_post();
                  ?>
      <?php
    $field_group_valuesh = simple_fields_fieldgroup("dados_promotoras");
    
    if ($field_group_valuesh[pname1] == "") {
      } else {
    echo "<p> ";
    print_r($field_group_valuesh[pname1]."</p>" ); } ;

    to display my relationship posts but i get all the posts and not only the ones ive selected in my costum post…any one can help ? tkss

    https://wordpress.org/plugins/advanced-custom-fields/

  • The topic ‘loop relational fields’ is closed to new replies.