wordpress 添加Google Tag Manage代码
wp-includes/functions.php
add_action('wp_head', 'custom_head_function');
function custom_head_function(){
?>
<!-- Google Tag Manager -->
<script>asdads</script>
<!-- End Google Tag Manager -->
<?php
};
add_action('wp_body_open', 'custom_foot_function');
function custom_foot_function(){
?>
asdads
<!-- End Google Tag Manager (noscript) -->
<?php
};
