The MU forums have moved to WordPress.org

compulsory post title (6 posts)

  1. peterbarretto
    Member
    Posted 15 years ago #

    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?

  2. Ovidiu
    Member
    Posted 15 years ago #

    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....

  3. peterbarretto
    Member
    Posted 15 years ago #

    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?

  4. gf8
    Member
    Posted 15 years ago #

    wan.?

  5. coudy87
    Member
    Posted 14 years ago #

    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!');
    }
  6. andrea_r
    Moderator
    Posted 14 years ago #

    The my-hacks file is being depreciated.

About this Topic

  • Started 15 years ago by peterbarretto
  • Latest reply from andrea_r