Here is code to check the_content is or not empty in wordpress.
1 2 3 4 5 6 7 | <?php $content = get_the_content(); if (trim( $content ) == "" ) { echo '<p>Empty Content</p>' } else { echo '<p>NOT Empty Content</p>' ; } ?> |
Here is code to check the_content is or not empty in wordpress.
1 2 3 4 5 6 7 | <?php $content = get_the_content(); if (trim( $content ) == "" ) { echo '<p>Empty Content</p>' } else { echo '<p>NOT Empty Content</p>' ; } ?> |
Notifications