I am trying to remove the default WordPress icon that displays on oembed links when there is no site icon. Here is a link to the site(3 links at the bottom) https://libsource.com/library-as-a-service/roadmapping-and-consulting-services/library-resource-analysis/. I have tried altering the code from the embed_site_title_html
function and adding it to my theme's functions.php file. This is how I added it:
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 );
I removed the code that linked to the icon. It did not work. I also tried using CSS to hide it with this code:
add_action( 'embed_footer', 'embed_custom_footer_style' );
function embed_custom_footer_style(){ ?>
<style>
.wp-embed-site-icon {
display: none;
}
</style>
I also copied the embed-content.php file from the includes folder and removed the icon image. Here is a link to the file in pastebin: https://pastebin.com/XmXRYui7
I am stumped as to why nothing seems to be working.