customization – Turn Autocomplete on


Unfortunately, there’s no hook available to change it.

You can see it in wp-admin/edit-form-avanced.php:

<label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo $title_placeholder; ?></label>
<input type="text" name="post_title" size="30" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" spellcheck="true" autocomplete="off" />

You’ll have to change it using JavaScript when the page has been loaded.

I made a little plugin that will fix your issue. Here’s the code:

 * Plugin Name: Autocomplete Title
 * Description: Sets the autocomplete attribute to true on WordPress post titles
 * Plugin URI:

namespace WPSEAutocompleteTitle;

 * Sets autocomplete attribute to true on WordPress post titles
function set_autocomplete_on_title() {
    echo '<script>
        if( $("#title").length ){
add_action( 'admin_footer', __NAMESPACE__ . '\set_autocomplete_on_title' );

When you activate the plugin, it will remove the autocomplete attribute from the title’s <input>.

DarrenLee 9 years 2015-01-21T21:02:48-05:00 0 Answers 0 views 0

Leave an answer