Skip to content

Instantly share code, notes, and snippets.

Avatar

Darren Lambert Pamps

View GitHub Profile
@Pamps
Pamps / wordpress-set-new-post-title-placeholder.php
Last active Nov 1, 2019
Change the WordPress New Post title placeholder
View wordpress-set-new-post-title-placeholder.php
<?php
// Add this to your theme functions.php file, or in a plugin file
// This example shows how to change the title field placeholder
// Post types titles
function cpm_change_default_title( $title ) {
$screen = get_current_screen();
if ( 'product' == $screen->post_type ) { // Change product for your post_type (.e.g post, page, etc)