I am struggling to get a simple string replace to work in wordpress the_content function.
<?php
$phrase = the_content();
$find = '<p>';
$replace = '<p style="text-align: left; font-family: Georgia, Times, serif; font-size: 14px; line-height: 22px; color: #1b3d52; font-weight: normal; margin: 15px 0px; font-style: italic;">';
$newphrase = str_replace($find, $replace, $phrase);
echo $newphrase;
?>
It just seems to echoing <p>
still.
Instead of <p style="text-align: left; font-family: Georgia, Times, serif; font-size: 14px; line-height: 22px; color: #1b3d52; font-weight: normal; margin: 15px 0px; font-style: italic;">