I bring a preview of the text of the article in this form:
index.php:
<div class="post__content"> ... <?php mytheme_excerpt(70); ?> ... </div> function.php:
/** Replaces "[...]" (appended to automatically generated excerpts) with ... and a 'Continue reading' link. */ function mytheme_excerpt($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); array_pop($excerpt); $excerpt = implode(" ",$excerpt)."<a href='" .get_permalink($post->ID) ." ' class='link'>...</a>"; echo $excerpt; } Through the admin I enter the text of the article.
Expectations:
<div class="post__content"> ... <p> Lorem ipsum .... </p> ... </div> Reality:
<div class="post__content"> ... Lorem ipsum .... ... </div> The <p> </p> tag is missing.
Question: how to programmatically make it so that when you add the text of the article, it turns into a <p></p> paragraph.