How to remove a specific string from inside the tag of a WordPress Page

FYI, I was able to get this to work by add a filter to ‘document_title_parts’ rather than ‘wp_title’, like so:

 add_filter( 'document_title_parts', 'tweak_custom_title' );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)