Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 96024

johnnyvenom on "[Theme: Leaf] How to remove 'Untitled' entry header from pages"

$
0
0

Hi, I'm trying to remove the 'Untitled' entry header that appears on pages without a title, as shown here: http://nmwbeta.wsg.net/events/

The following function in the theme's includes/theme-functions.php sets this:

function leaf_no_title($title) {
    if ($title == '') {
        return 'Untitled';
    } else {
        return $title;
    }
}
add_filter('the_title', 'leaf_no_title');

so I can easily change it there, or even leave this out altogether. So my question is, how can I change this within my child theme so it won't get overwritten with future theme updates? I've tried a few different things, moving the function to my child theme functions.php, copying the entire theme-functions.php file to child folder, etc, but nothing has worked yet.

Thanks,
Johnny


Viewing all articles
Browse latest Browse all 96024

Trending Articles