S
S
SEOInquisitor2021-12-24 13:35:20
WordPress
SEOInquisitor, 2021-12-24 13:35:20

How to change H1 on attribute value page?

Good day, I ask for help

The situation is as follows, the attributes of the product below it are displayed in the online store. 61c5a1ce2ca8d910603655.png
When you click on an attribute, it redirects to its page, where all products with this attribute are located.
I want to change the local H1 to another one, but when changing the name of the attribute value, the name of the attribute at the bottom of the product also changes.

It turns out that I need the H1 on the attribute value page to be one, and its name for product cards, etc. to be different, how to do this61c5a299aa797643981947.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daulet, 2021-12-24
@phpneguru

You can use the ACF plugin and add an additional field in the Taxonomy and replace the H1 output in the desired pages with the value from the new field.

A
Artem Zolin, 2021-12-24
@artzolin

The title of the archives is displayed using a function in the archive-product.phpwoocommerce_page_title() file , this function has a filter of the same name. You can change header content using ACF, Carbon Fields or any other logic you like

add_filter( 'woocommerce_page_title', 'filter_function_name_7320' );
function filter_function_name_7320( $page_title ){
  // filter...

  return $page_title;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question