clubmate.fi

A good[ish] website

Web development blog, loads of UI and JavaScript topics

Change the WordPress title field placeholder text

Filed under: WordPress/PHP— Tagged with: functions.php

Really handy snippet to change the "Enter title here" text to suit your post type better.

Just paste this to your functions.php, change the POST_TYPE and the default text.

function change_default_title( $title ) {
  $screen = get_current_screen();

  if ( 'POST_TYPE' == $screen->post_type ) {
    $title = 'Enter Invoice Title';
  }

  return $title;
}

add_filter( 'enter_title_here', 'change_default_title' );

Source

Comments would go here, but the commenting system isn’t ready yet, sorry.

  • © 2022 Antti Hiljá
  • About
  • All rights reserved yadda yadda.
  • I can put just about anything here, no one reads the footer anyways.
  • I love u!