Whenever I’ve developing a new theme I always wrap the_content
in a div, like so;
<div class="entry-content">
<?php the_content();?>
</div>
Is there a way I can streamline this process and automatically wrap the_content
in a div via a function so I don’t always have to manually code it and, more importantly, so if my client ever feels like flexing their coding muscles there wont be a problem if they forget to do it…
You can hook
the_content
filter.paste below code in
functions.php
:After paste this code in
functions.php
,the_content()
print post/page content after wrap content indiv
with classentry-content
.