- Local time
- Oct 6, 2019
Working on a wordpress project right now and I keep running into situations like this:
<header>Hello!</header> <?php while (have_posts()) : the_post(); ?> <div class="post-wrap"> <h3 class="title"> <?php the_title();?> </h3> <div class="post"> <?php the_content();?> </div> </div> <?php endwhile;?>
My instinct is to indent the current-post-wrap <div> block because it's inside a PHP while statement - even though it's on the same level as the <header> block...!
Is there a standard way to do this? I guess you could argue it's not a huge deal as long as you standardize it throughout the project but I'm curious.