Hiding some stuff from URL card

Is there a way to hide the site name and author name from the URL card that shows up when you paste a URL in an article?

If you’re talking about the website, yes. Use code injection. For email, no, or use some custom html.

2 Likes

Thanks Cathy

ideally for both web and newsletter but I guess I could start with the web. Would be awesome if anyone could share the code injection for that.

I think a general “how to hide X” answer is needed here :blush:

Basically, you need to inspect that element in browser (right click the element you want to hide, select Inspect Element). Check if that element has a specific class attribute, or an id attribute. Then write a simple CSS code in code injection like:

<style>
.class-name-of-the-element {
   display: none;
}
</style>

or

<style>
#id-name-of-the-element {
   display: none;
}
</style>

For bookmark card site and author name is inside an element with a class name kg-bookmark-metadata. So a like below will hide the author data from all of the bookmarks.

<style>
.kg-bookmark-metadata {
  display: none;
}
</style>

This removes that element from layout, which reduces the height of Bookmark card. Alternatively, you can use opacity: 0; instead of display: none; if you want to keep the size of bookmark card as is.

CSS is awesome, and I suggest everyone to check basic CSS writing knowledge for a better internet experience. You can customize all of the websites you visit with simple CSS codes with some browser extensions [1] [2]. :blush:


  1. ↩︎

  2. ↩︎

2 Likes

Thank you- this is very helpful!