I am using advanced custom fields in wordpress and having this line of code:
<p class="small"><?php the_field('somefield', 'options'); ?></p>
And it is printed like this in the browser:
<p class="small></p>
<p>the content of somefield</p>
Why does this happen and how do I fix it?
it's because you are using paragraph inside and paragraph you can fix it by using the fix below , if you are inserting the
<p>
inside this field , please usespan
or something else it will cause this problem if you use<p>
: