Wordpress 不和谐预览

Wordpress Discord Preview

在使用 wordpress 时,您需要编辑什么来更改预览显示以在 Discord 等聊天中上传。当前发布 link 时显示如下。

预览显示站点名称,然后是作者,然后是页面名称。您必须在 wordpress 中更改什么才能改变这个?

编辑: 此代码在页面

    <meta property="og:url" content="http://kltools.net" />
    <meta property="og:title" content="Twitch Kittens Tools" />
    <meta property="og:description" content="Twitch Kittens Tools" />
    <meta property="og:image" content="http://kltools.net/wp-content/uploads/large_logo_only-1-150x150.png" />
    <meta property="og:type" content="website" />

现在将显示更改为

这里的最后一步是我想去掉作者标签。

我试过一个插件,它应该从 php 和 css 中删除作者,但它仍然显示。有什么人可以建议摆脱 og 元预览中的作者标签

将此添加到主题的 functions.php 文件中:

add_filter( 'oembed_response_data', 'disable_embeds_filter_oembed_response_data_' );
function disable_embeds_filter_oembed_response_data_( $data ) {
    unset($data['author_url']);
    unset($data['author_name']);
    return $data;
}