I tested it on another site it worked normally, only on my current site that has a problem
I was using The SEO Framework plugin, imported the configuration, then removed the entire table from the old plugin and the error was not solved.
The error that I can’t use the
titles and goals functions
When I add a name here, it does not appear on the page, https://imgur.com/a/c5Juwov.
I’ve used an advanced reset tool and it hasn’t been solved either
I discovered the cause of the problem
It does not work with the following “Newspaper” theme.
https://themeforest.net/item/newspaper/5489609
The conflict is with the tagDiv Composer plugin.
Try to add this snippet as mu-plugin (may also work in your functions.php file of your child theme):
add_action( 'after_setup_theme', function() {
add_theme_support( 'title-tag' );
remove_all_filters( 'wp_title' );
remove_all_filters( 'wpseo_title' );
remove_all_actions('wp_head', 'theme_slug_render_title');
add_filter( 'wp_title', 'sp_remove_title', 9999999999999, 2 );
}, 99999999999999);
function sp_remove_title( $title, $sep ) {
return false;
}
add_action('wp_loaded', 'buffer_start');
function buffer_start() {
ob_start("sp_remove_empty_title");
}
function sp_remove_empty_title($buffer) {
$buffer = str_replace('<title></title>','',$buffer);
return $buffer;
}