【问题标题】:Wordpress: Add Google Tags to website's home pageWordpress:将谷歌标签添加到网站的主页
【发布时间】:2021-09-22 07:01:50
【问题描述】:

我想编辑我网站的主页。

添加谷歌标签<meta name="google-site-verification" content="************" />

但我在 WordPress 中找不到主页 HTML。我看到的只是 Wordpress/Elementor 页面编辑器,它允许我编辑块,但不能编辑顶部 <html> 标签。

我该怎么做?我没有 CPanel/FireZilla 访问权限。

【问题讨论】:

标签: php html wordpress google-tag-manager


【解决方案1】:

在 fuction.php 你的主题添加这个

add_action( 'wp_head', 'google_verification', 1);
function google_verification() {
    echo '<meta name="google-site-verification" content="************" />', "\n";
}

【讨论】:

    【解决方案2】:

    在WordPress仪表板外观-->主题编辑器-->Header.php文件(如果存在) 复制代码并粘贴在两者之间。然后更新

    【讨论】:

      猜你喜欢
      • 2016-12-08
      • 1970-01-01
      • 2020-07-01
      • 1970-01-01
      • 2012-06-14
      • 1970-01-01
      • 2018-09-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多