Support » Fixing WordPress » Automatically create title

  • Is it possible to automatically create a title for a post?

    I want to have the user not worry about the title, it will just automatically add the user’s username as the title.

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    (@esmi)

    Forum Moderator

    Try adding something like:

    function my_autogenerate_title( $title ) {
    	if ( !$title ) $title = get_the_author();
    	return $title;
    }
    add_filter( 'the_title', 'my_autogenerate_title' );

    to your theme’s functions.php file.

    WARNING: Not tested.

    Thanks, that was quick.

    I’ll give it a go and see what happens.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Automatically create title’ is closed to new replies.