Conditionally changing placeholder on edit page title field (1 post)

  1. hulku
    Posted 3 years ago #

    I've been trying to change the placeholder text in the editor screens, i know the snippet below (without the if statement will change it on all edit pages, but I want to know if there is a way to change it conditionally, on an add new CPT page for example

    function change_title($title){
    		if ($pagenow = 'post-new.php?post_type=movies') {
    			$title = 'Enter Movie Title';
         	return $title;
    add_filter( 'enter_title_here', 'change_title' );

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.