Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Alter the WordPress post title placeholder text
<?php
/**
* Alter the enter title here placeholder text.
* This is on the WordPress post edit screens.
*
* @param string $title The is the current placeholder string.
* @return string The modified placeholder string.
*/
function hd_title_here( $title ) {
// set a new string for the placeholder text.
$title = __( 'Enter article title here.', 'text-domain' );
// return the title back to the hook.
return $title;
}
add_action( 'enter_title_here', 'hd_title_here', 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.