How does a default WordPress install with the Kadence theme display a post with no title? Let’s see!

I didn’t put a title on this one. It awkwardly says (no title) in my Posts list. But I have no idea how it’ll look in the loop or if I can manipulate with hooks or something.

*TIL that Kadence allows you to disable the title in Post Settings. But! that does not apply to archives. The trick is to disable the title in post settings…and the add the following code to your functions.php (or Code Engine plugin) to filter it from the archives.

// Add to child theme's functions.php
add_filter('the_title', function($title, $id) {
    if (is_admin() || is_singular()) return $title;
    
    // Check if Kadence hide title is enabled for this post
    if (get_post_meta($id, '_kad_post_title', true) === 'hide') {
        return '';
    }
    return $title;
}, 10, 2);

Similar Posts