Support

Account

Home Forums Front-end Issues get_the_title($post->ID) only shows outside my loop Reply To: get_the_title($post->ID) only shows outside my loop

  • Looks like just a minor typo possibly. In your first <td> you’ll need to echo your values. Also, the permalink variable was not declared. Might try:

    
    if( $posts ):
        foreach( $posts as $post ):
    	$fww_title = get_the_title( $post->ID );
    ?>
    	   <tr>
    		<td><a href="<?php echo get_permalink( $post->ID ); ?>"><?php echo $fww_title; ?></a></td>
    		<td>test</td>
    		<td><?php the_field('player_gender', $post->ID); ?></td>
    		<td><?php the_field('player_level', $post->ID);  ?></td>
    		<td><?php the_field('player_city', $post->ID); ?>, <?php the_field('player_state', $post->ID); ?></td>
    		<td><?php the_field('player_phone', $post->ID); ?></td>
    		<td><?php the_field('player_email', $post->ID); ?></td>
               </tr>
         <?php endforeach; ?>
    <?php endif; ?>