I'd like to place the contents of a custom field or variable in between the second and third paragraphs in the loop on a page template.
Is there a way to do this?
So for example, on a client's website I would like them to use the post editor to write out their page content, and keep things simple for them by giving them the ability to write out a call to action in a custom field that diplays between two paragraphs of
the_content();
using either a plugin or a PHP snippet or filter in functions.php.
Thanks very much.
post_content
does not inherently contain paragraphs, it only contains paragraphs ifwp_auto_p
is enabled, and even then it is not a sure thing. Is there a reason that the element cannot be placed with CSS alone?