I have the following code, which displays the content for my custom page template ""landingpagelandingpage.php"php" and for single posts. The site uses Bootstrap 4.
<?php if(is_page_template( 'landingpage.php' )): ?>
<div id="content" class="site-content">
<div class="container-fluid">
<div class="row">
<?php elseif (is_single()): ?>
<div id="content" class="site-content pt-4">
<div class="container-fluid">
<div class="row">
<?php else: ?>
<div id="content" class="site-content">
<div class="container">
<div class="row">
<?php endif; ?>
Is there a more elegant and/or shorter way to achieve this?