• wordpress displays my admin email adress when I share a post link on facebook twitter or discord.

    how do I disable that, I use rankmath seo.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Checkout source of your html. Why its printing admin email in output. Have you added admin email in author cards?

    Also use structured data schema to help social sites discover right content for social snippets.

    You’re probably using your email address as your username, and this is also set under “Display name publicly as” in your user profile.

    If this is so, then your email address (which is also your username) is displayed publicly all over the place, not only in social shares.

    Open your user profile and make sure you have something else besides your email address under “Display name publicly as”.

    Note that if the First Name, Last Name and/or Nickname fields are all empty, you may not be able to change the “Display name publicly as”… so you may have to set fill these fields and save the page before you can change the public display name setting.

    If you do the above and your email still appears, then you may have to change the actual username to something else other than your email address. Use the “Easy Username Updater” plugin to do this: https://wordpress.org/plugins/username-updater/

    Good luck!

    Hi, @ferdalkrmn

    This behavior is caused by the Open Graph protocol, which social media platforms use to display information about a web page when it is shared. By default, WordPress adds the website’s administrator email address to the Open Graph data for the page, which is then displayed when the page is shared on platforms like Facebook, Twitter, and Discord.

    If you would like to remove or change the displayed email address, you can edit the Open Graph data for your website. Here are a few ways you can accomplish this:

    Using a plugin: Several plugins allow you to customize the Open Graph data for your WordPress website. You can search for Open Graph plugins in the WordPress plugin repository and find one that meets your needs.

    Editing your theme’s header.php file: You can also edit the header.php file of your WordPress theme to remove or change the displayed email address. You can do this by locating the following code in the file:

    <meta property="og:email" content="<?php bloginfo('admin_email'); ?>" />

    And removing or changing it to the email address you want to display.
    Thank you.

    @sharif200:

    WordPress adds the website’s administrator email address to the Open Graph data for the page,

    I may be wrong, and I’m hoping you can point me to some documentation on this.

    But, to the best of my knowledge, WordPress itself doesn’t add ANY OG metadata at all, let alone the lesser-known og:email (I’m not entirely sure if there’s even such a thing, as I couldn’t find it on https://ogp.me/).

    In any case, I’m supposing you checked OP’s site and found this og:email meta property exists, hence your recommendation to remove it. I checked, and I didn’t find any such thing the site.

    Cheers!

    Thread Starter ferdalkrmn

    (@ferdalkrmn)

    @sharif200 I want to do it without the plugins, so if I just place this code in header.php would it remove it ? I kind of got confused.

    <meta property=”og:email” content=”<?php bloginfo(‘admin_email’); ?>” />

    thank you everyone for your answers.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WordPress displays my email address in social preview’ is closed to new replies.