Support

Account

Home Forums Front-end Issues Wants to show relationship, user field how is chosen

Unread

Wants to show relationship, user field how is chosen

  • Hi!
    I’m using ACF PRO 5.6.10
    Latest WP and my own theme.

    I have a custom post type “utbildning” (education) and a ACF relationship/user.

    Here the education is, no problem, here I can se the users.
    http://safeontrack.com/utbildning/su1-mantorp-park-1-2018/
    “Deltagare” (participant)

    But here in the author I can se all educations – I only wants to show the one who the user have been at.

    I put them temporarily in top sidebar.
    http://safeontrack.com/author/dm-elle/

    
     $args = array (
        'post_type' => 'utbildning', 
        'posts_per_page' => -1, 
        'meta_key' => 'deltagare', 
        'meta_compare' => 'EXISTS' 
    );
    
    $query = new WP_Query($args);
    while ($query->have_posts()): $query->the_post();
            
        echo '<ul>';
        echo '<li>';
            echo get_the_title( $utbildning->ID ); 
        echo '</li>';
        echo '</ul>';
        
    endwhile;
    wp_reset_query();
         
         
Viewing 1 post (of 1 total)

The topic ‘Wants to show relationship, user field how is chosen’ is closed to new replies.