Код: Выделить всё
®

Есть ли способ сделать это так, как в заголовке не только что отображается в названии как код? Может быть, что -то в шаблоне WordPress? /> Редактировать:
Я пробую что -то похожее на комментарий ниже.
Код: Выделить всё
function add_superscript_to_trademarks_in_single_title( $title ) {
// Check if we are on a single post, page, or other singular post type
if ( is_singular('product') ) {
// Replace the trademark symbols with their superscripted versions (with HTML)
$title = str_replace( array( '®', '®' ), '®', $title );
} else {
// If not on a singular page, strip HTML tags from the title
$title = wp_strip_all_tags($title); // Or use strip_tags( $title );
}
return $title;
}
add_filter( 'the_title', 'add_superscript_to_trademarks_in_single_title' );
< /code>
Это помогает с заголовком только на одной странице пост. Первоначально я установил его, чтобы добавить
Подробнее здесь: https://stackoverflow.com/questions/796 ... post-title