This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check if the content is empty and show a custom message // | |
add_filter('the_content', 'text_for_empty_content', 20, 1); | |
function text_for_empty_content($content){ | |
if(empty($content)) // Check if the content is empty | |
return '<p>Under Construction</p>'; // Add your custom text or other HTML | |
else | |
return $content; // if content is there, just leave it as it is | |
} | |
/* |
NewerOlder