I tried using the wp_title
filter as described in another thread, but it’s not working for me. I know it is from 2017, so maybe things have changed?
add_filter( 'wp_title', [ $this, 'tab_title' ] );
public function tab_title( $page_title ) {
return 'Test';
// if ( is_singular( $this->post_type ) ) {
// $site_title = sanitize_text_field( get_option( 'mppi_site_title' ) );
// return trim( $page_title ) . ' | ' . $site_title;
// }
// return $page_title;
} // End tab_title()