I have this snippet of PHP which looks at each post and displays the categories it is listed in on the archive page BUT I want to separate them either with
or in a OR even just with a comma and a space would work. Thanks
<?php if ( ! $jobs ) : ?>
<tr>
<td colspan="6"><?php _e( 'You do not have any active listings.', 'wp-job-manager' ); ?></td>
</tr>
<?php else : ?>
<?php foreach ( $jobs as $job ) : ?>
<tr>
<?php foreach ( $job_dashboard_columns as $key => $column ) : ?>
<td class="<?php echo esc_attr( $key ); ?>">
<?php if ('job_title' === $key ) : ?>
<?php if ( $job->post_status == 'publish' ) : ?>
<a href="<?php echo get_permalink( $job->ID ); ?>"><?php echo $job->post_title; ?></a><br> Job Status:
<?php
$terms = wp_get_post_terms( $job->ID, 'job_listing_category' );
foreach ( $terms as $term ) {
echo $term->name;
}
?>
<?php else : ?>
<?php echo $job->post_title; ?> <small> (<?php the_job_status( $job ); ?>)</small>
<?php endif; ?>
ifpart of your code so it errors out.