我正在尝试删除默认的WordPress图标,当没有站点图标时,它会显示在oembed链接上。这里是该网站的链接(底部有3个链接)https://libsource.com/library-as-a-service/roadmapping-and-consulting-services/library-resource-analysis/. 我试着从embed_site_title_html
函数并将其添加到我的主题函数中。php文件。我是这样添加的:
function groovy() {
$site_title = sprintf(
esc_url( home_url() ),
esc_html( get_bloginfo( \'name\' ) )
);
$site_title = \'<div class="wp-embed-site-title">\' . $site_title . \'</div>\';
return $site_title;
}
add_filter( \'embed_site_title_html\', \'groovy\', 10, 2 );
我删除了链接到图标的代码。它不起作用。我还尝试使用CSS将其隐藏在以下代码中:add_action( \'embed_footer\', \'embed_custom_footer_style\' );
function embed_custom_footer_style(){ ?>
<style>
.wp-embed-site-icon {
display: none;
}
</style>
我还复制了嵌入内容。从includes文件夹中删除php文件并删除图标图像。以下是指向pastebin中文件的链接:https://pastebin.com/XmXRYui7我被难住了,为什么似乎什么都没起作用。