• Resolved desktopanywhere

    (@desktopanywhere)


    When editing a Post as Admin the visible Title of the Tab is in the form:

    “Edit Post < Site Name — WordPress”

    I would like to see the “Post Name” rather “Site Name — WordPress”

    I believe that I just need to replace the existing variable site_name to post_name somewhere but not sure of the location.

    Thanks for any help,

    DAC

Viewing 2 replies - 1 through 2 (of 2 total)
  • Deni

    (@dennis_f)

    Hi there,

    You can try adding the following code to the functions.php file of your child theme:

    function my_custom_edit_post_title($title){
    	global $pagenow;
    
    	if($pagenow == 'post.php' && isset($_GET['action']) && $_GET['action'] == 'edit'){
    		global $post;
    		$title = str_replace ( get_bloginfo('name'), $post->post_title, $title);
    	}
    	return $title;
    }
    add_filter( 'admin_title', 'my_custom_edit_post_title', 10, 2 );

    Hope this helps.

    Thread Starter desktopanywhere

    (@desktopanywhere)

    Hi Deni,

    As you suggested, I just placed your code at the end of the child theme functions.php as you suggested and it works great.

    I really appreciate it. I expect this will actually be better than what I was trying to do via supplanting the site_name with the post_title. In part, I think this tab title change will not get overlaid on WordPress updates.

    In any case, I am doing multiple edits on numerous pages in one browser window at a time on the GiantLeap.com news section and this will allow me to see enough of the post name to keep them straight. I never had this requirement before, but I run into it almost daily now and this will really help me.

    Thanks again,

    DAC

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Tab Title Edit Mode’ is closed to new replies.