Support

Account

Home Forums General Issues Custom Post Type Relationship Archive Page Reply To: Custom Post Type Relationship Archive Page

  • Then your query is correct. But if you want to query individual artists, you have to use a single-artists.php.

    Another tip: If you name your variable $works and not $posts then it’s easier to read:

    <?php 
    
    $works = get_field( 'featured_works' );
    
    if( $works ):
    
    foreach( $works as $work ):
    
    echo get_the_permalink( $work->ID );
    
    endforeach;
    
    else:
    
    echo sprintf( '<p>%s</p>', __('No work here...') );
    
    endif;

    In your field ‘featured_works’ you have an object with work?