How to filter when the_content is empty?
-
function new_filter_content($content) {
$content = get_field( 'mll_kratki_opis');
return $content;
};
add_filter('the_content', 'new_filter_content');This function works when there is something in the_content to replace, but it does not work if there is nothing in the_content, how to make it work if there is nothing in the_content too, or only if there is nothing in the_content?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.