Im learning PHP and wanted to ask with writing the following IF statements which is the more proper way it should done. Have been reading up online about it though for now cant find an answer.
In general also is it necessary to add an ENDIF also?
<?php if ( in_category( 'workshops' )) {
get_template_part( 'template-parts/content', 'workshops' );
} ?>
OR
<?php if ( in_category( 'workshops' )) : ?>
<?php get_template_part( 'template-parts/content', 'services' ); ?>
<?php endif ?>