Question

I have a weird problem with a wordpress site I'm working on, when we share links for it on discord shared link contains my login name and a link to author posts page (index is a page not a blog page) but when I look at the source there is not a single reference to my login name on the page, also facebook and other social media sites don't have this as there is no metadata about it but somehow discord fetches my username (probably because I'm the creator of it) but I'm unable to find how it does that and remove that from links. Any ideas?

Page in question: angelicthegame.com/

Discord link preview:

Discord link preview with author name

Erdi is the author name displayed and links to https://angelicthegame.com/author/erdi/

Was it helpful?

Solution

This might help you. Add this script to functions.php. It will unset author from oembed preview. Remember Discord might already cached your URL. You may not get immediate result.

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;
}

for more explanation head over here

OTHER TIPS

Just ran into this issue myself, you are the author of that page so it shows on a Discord link. The best work-around I have found that i'm using is simply changing the author to the Websites Name. So when it shows in discord it shows as the Author is the domain and not a person!

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top