如何删除Oxwall软件或任何软件中的元标记。Oxwall核心在自动错误的Facebook元标签上加载。
错误的值(由Oxwall产生):
<meta name="og:type" content="website" />
正确值:
<meta property="og:type" content="website" />
提前谢谢
发布于 2020-06-28 15:13:33
您可以将下面的行包含到基本或插件init.php文件中。如果您没有使用打开的插件/ow_system_plugins/base/init.php,并添加以下代码:
function modify_custom_meta_property(){
OW::getDocument()->addMetaInfo('og:type', 'website', 'property');
}
OW::getEventManager()->bind(OW_EventManager::ON_BEFORE_DOCUMENT_RENDER, 'modify_custom_meta_property');发布于 2020-07-07 17:33:54
我终于找到解决办法了。
你必须这样做:
ow_system_plugins/base/classes/event_handler.php,
示例:
// $document->addMetaInfo("og:type", "website");
函数modify_custom_meta_property(){
现在:getDocument()->addMetaInfo(‘og:type’,‘type’,'property');
现在::getDocument()->addMetaInfo(‘og: title’,'Your title‘,'property');}
清除您的网站缓存和查看您的网页的源代码,现在正确的metas应该被添加和错误的metas消失。
https://stackoverflow.com/questions/62622360
复制相似问题