remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10);
function my_theme_wrapper_start() {
// echo '<section id="main">';
echo '<main id="primary" class="site-main">';
}
function my_theme_wrapper_end() {
// echo '</section>';
echo '</main>';
}
function mytheme_add_woocommerce_support() {
add_theme_support( 'woocommerce' );
}
add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );
function americanfitness_scripts_styles(){
//Регистрируем стили
wp_register_style( 'style', get_template_directory_uri() . '/css/style.css', array(), null, 'screen');
//Подключаем стили
wp_enqueue_style( 'style');
//Регистрируем скриты
wp_register_script( 'fontawesome', 'https://kit.fontawesome.com/b2fe464e5c.js', array(), null, true);
//Подключаем скрипты
wp_enqueue_script( 'fontawesome');
}
add_action( 'wp_enqueue_scripts', 'americanfitness_scripts_styles', 1 );
americanfitness_scripts_styles
? window.dataLayer.push({
"ecommerce": {
"currencyCode": "RUB",
"purchase": {
"actionField": {
"id" : "TRX987",
"name" : presidentName,
"price": 60.00,
"brand": "",
"category": chooseStr,
"variant" : ""
},
"products": [
{
"id": "P15432",
"name" : presidentName,
"price": 60.00,
"brand": "",
"category": chooseStr,
"variant" : ""
}
]
}
}
});