Because the_content() will always wrap the content with a <p>
tag.
You can use get_the_content() insted of the_content() but using get_the_content() will give you the content without any shortcodes or embedded media as mentioned at codex .
This is another solution to get exactly what you want:
<?php
$content = get_the_content();
$content = apply_filters('the_content', $content);
$replace = '<p class="discription">';
echo str_replace('<p>', $replace, $content ); ?>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.