When doing a template such as single.php and you have php wrapped in html, is it best to :
Start + Stop PHP? for example
<h1 class="post-tilte"><?php the_title(); ?></h1> <p class="post-content"><?php the_content();?></p>
Or
Echo HTML and Escape PHP? For example -
<?php echo '<h1 class="post-title">' . get_the_title() . '</h1> <p class="post-content"' . get_the_content() . '</p>
I dont have a prefreed choice and find myself doing both, just curious to hear some thoughts
functions.php
or plugins etc.printf( '<h1 class="post-title">%s</h1>', get_the_title() );