i want the users on my blog to always write a post title. i dont want a post title to be empty. how can i do such a thing?
i want the users on my blog to always write a post title. i dont want a post title to be empty. how can i do such a thing?
no idea but I use a plugin that fills in a certain text if no post title is entered, aka "I forgot my post title" its been written long ago by luke I think but still works....
i want something like when a user does not enter a post he /she should get an error message. can this be done? is there a plugin for it?
wan.?
Insert this to my-hacks.php file:
add_filter('the_title', 'empty_title');
add_filter('get_the_title', 'empty_title');
function empty_title($title)
{
return (strlen($title) ? $title : 'Empty title!');
}
The my-hacks file is being depreciated.