I’ve spent approach an excessive amount of time attempting to wash this up.
I’m merely trying to return some HTML from a shortcode, right into a shortcode block inside the content material editor.
$next_friday = new DateTime();
$next_friday->modify('subsequent friday');
$final_date = $next_friday->format('l, F j, Y');
$reponse_formatted = "<h3 class='has-text-align-left'>$final_date</h3>";
$reponse_formatted .= "<p>Pre-sale for <u>Next Friday</u> Will Start on Tuesday at 5pm</p>";
return $response_formatted;
Fairly simple … however the finish outcomes is that this HTML on the entrance finish:
<h3 class="has-text-align-left">Friday, October 15, 2021</h3>
<p>
"Pre-sale for "
<u>Subsequent Friday</u>
" Will Start on Tuesday at 5pm"
</p>
What’s going on with this shortcode block? I simply want it to render usually, like:
<h3 class="has-text-align-left">Friday, October 15, 2021</h3>
<p>Pre-sale for <u>Subsequent Friday</u> Will Begin on Tuesday at 5pm</p>