Im looking to edit the html code generated for the title on the product category pages.

Currently it is:

<h1 class="page-title">Category 1</h1>

But id like to change it to:

<h1 class="page-title" data-name="Category 1">Category 1</h1>

I understand this is done by adding a hook to the functions.php file, but am having trouble finding the correct code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.