Last active
January 11, 2022 09:02
-
-
Save artikus11/2fa470ba0f71c03761b81dde3ea3f6a7 to your computer and use it in GitHub Desktop.
Добавление собственных фраз перед заголовком товара, на странице товара
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 ); //отключаем шататный вывод заголовка | |
add_action( 'woocommerce_single_product_summary', 'art_before_title_product', 5 ); //Подключаем собственную функцию вывода заголовка | |
function art_before_title_product() { | |
if (is_product){ // проверяем что это страница отдельного товара | |
the_title( '<h1 class="product_title entry-title">Фотообои ', '</h1>', true ); // выводим заголовк в собственной обертке | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment