S
S
Sergey Shkurikhin2020-07-09 17:53:08
WordPress
Sergey Shkurikhin, 2020-07-09 17:53:08

How to remove word substitution from H1, for example: category?

Tell me how to remove unnecessary substitutions in h1 added - category: ... How can the code look where to find it? And how to remove the substitution of the word: "Archives" or "Home" from the title (top left of the site icon)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Litvinenko, 2020-07-09
@shkyrikhin99

// Удаляет "Рубрика: ", "Метка: " и т.д. из заголовка архива
add_filter( 'get_the_archive_title', function( $title ){
  return preg_replace('~^[^:]+: ~', '', $title );
});

and in the title, look towards the SEO plugin, Yoast seo adds this by default

P
Pychev Anatoly, 2020-07-09
@pton

Judging by the names of css classes, this should be looked for in your theme. Try a code search.
and so the woocommerce_page_title() function is responsible for displaying the title

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question