Andrei | восстановил необходимую функцию get_page_type для pixel

pull/36/head
Your Name 3 weeks ago
parent 921d807a6f
commit 2cc35d864d
  1. 23
      wp-content/themes/cosmopet/global-functions/multisite-functions.php

@ -400,4 +400,25 @@ add_action('wp_head', function() {
// Рендерим шаблон
\Timber\Timber::render('templates/head-pixel-functions.twig', $context);
}
});
});
function get_page_type() {
if (is_home() || is_front_page()) {
return 'home';
} elseif (is_shop()) {
return 'shop';
} elseif (is_product_category()) {
return 'category';
} elseif (is_product_tag()) {
return 'tag';
} elseif (is_search()) {
return 'search';
} elseif (is_cart()) {
return 'cart';
} elseif (is_account_page()) {
return 'account';
} else {
return 'other';
}
}

Loading…
Cancel
Save