Hi pakpenyo,
If I understand it correctly, with the em
tags you wish to style the title for your theme, but it must be stripped completely for The SEO Framework’s output, like the <title>
and open graph tags.
The reason we don’t normally remove these is because we believe the user should be fully aware of its implications. Thus resulting in always expected output, i.e. what’s inputted.
Nevertheless, it is possible to get your wished for output.
You can add the following snippet in your (child) theme’s functions.php
file, or in a separated plugin:
add_filter( 'the_seo_framework_pro_add_title', 'my_pro_title_filter', 10, 3 );
/**
* Filters The SEO Framework title output after processing.
*
* @since my_version
*
* @param string $title The processed title, before escape.
* @param array $args The title processing arguments.
* @param bool $escape Whether the output will be escaped right after.
* @return string $title The SEO Framework title.
*/
function my_pro_title_filter( $title, $args = array(), $escape = true ) {
return wp_strip_all_tags( $title, true );
}
Enjoy!
P.S. Your English is perfect, don’t worry about that 🙂