Skip to content

Instantly share code, notes, and snippets.

@wpmark
Created August 22, 2018 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpmark/a17849914ac7281ccfb431d64fd7fcdb to your computer and use it in GitHub Desktop.
Save wpmark/a17849914ac7281ccfb431d64fd7fcdb to your computer and use it in GitHub Desktop.
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