wpautop() | Function | WordPress Developer Resources

PHOTO EMBED

Sat May 21 2022 08:58:42 GMT+0000 (UTC)

Saved by @raca12 #php

<?php
$some_long_text = // Start Text
Some long text
that has many lines
 
and paragraphs in it.
// end text
 
echo wpautop( $some_long_text );
?>
content_copyCOPY

https://developer.wordpress.org/reference/functions/wpautop/