• So I want to add a feature image to be picked up on social websites, or anywhere I leave a post with my page link, but I don’t want that image to actually show on my page.

    I understand you can do that with an open graph reference?

    This is the code I added to WordPress on the “text view” opion:
    <meta property="og:image" content="https://www.tu.biz/wp-content/uploads/2020/02/HydraulicPumpDisplacementVid.jpg" />

    Is there a different way I can do this? What am I doing wrong?

    • This topic was modified 4 years, 8 months ago by Steven Stern (sterndata).
    • This topic was modified 4 years, 8 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Yui

    (@fierevere)

    永子

    You have Yoast SEO Premium on your site. It perfectly handles OpenGraph meta tags by itself.
    You can ask Yoast support about using special image just for OpenGraph.

    Thread Starter tu586

    (@tu586)

    They don’t handle it that way.

    With Yoast you just upload a picture to the page and that is it.

    I am not looking to upload the picture on the page. I am looking to reference the picture to show on links posted in social media such as LinkedIn, Facebook, etc..

    Hi @tu586,

    @fierevere’s answer is correct. You can override the default social preview image (e.g. WordPress feature image) with Yoast Premium.

    Then, you can remove your feature image. Or, keep your feature image but disable it from displaying on your page depending on your theme.

    If you don’t want to use Yoast Premium, you can write the OG markup yourself. Then inject the markup yourself using your theme (if supported) or an insert header/footer plugin.

    Good luck!

    Thread Starter tu586

    (@tu586)

    This is what I got from Yoast.

    “We suggest contacting your theme developer for more information as the theme (rather than Yoast) controls how the feature image does or does not appear on a page.”

    Now, I am the site owner and I have been building new pages from the webiste that was initially built from another person.

    Question:

    How do I know what theme is this?

    I have no interests and I will not go back to the person who started the building of this site. I will find a way around it before going back to them.

    I am also using Visual Composer and they don’t know how to deal with feature images either.

    Hi @tu586,

    The easiest way to find out what theme your site is on if you have wp-admin access is Appearance > Themes.

    If you don’t have access, bring up the site in a Firefox or Chrome > Right Click > View Source > Search for “themes/”.

    I think you are on something called anco. Which I don’t see in the themes directory. That should throw up some flags for you.

    BTW, if you hang around long enough, you’ll notice that finger-pointing between WordPress, themes, and plugins is very common. It’s best if you hire a developer or learn how to code yourself to figure out what’s really going on.

    Good luck!

    Thread Starter tu586

    (@tu586)

    It seems to be a coding arrangement solution that might be beyond the reach of Yoast or Visual Composer.

    Of course if I would know actual coding (which I would like to learn in details) I wouldn’t be jumping between these guys.

    Would you know any forums for WordPress coding in which I can find where to place these type of functions?

    I have been reading about open graph from Facebook and how to place a code on the headed and so.. but with WordPress I haven’t even found the proper location on where to place the codes.

    My experience in coding and wordpress is of course limited.

    Hi @tu586,

    For your OG meta, try to grab the html code that Yoast generates from your site. Copy and paste that in a file and save it on your hard drive somewhere. It should something like this (one of my sites as an eg.). Notice: the og:image tag. That’s where you supply the link to the image you want for social previews.

    
    <meta property="og:type" content="website">
    <meta property="og:locale" content="en_US">
    <meta property="og:site_name" content="c a u g ht my e y e">
    <meta property="og:title" content="stories">
    <meta property="og:url" content="https://caughtmyeye.dev/">
    <meta property="og:image" content="https://www.caughtmyeye.dev/assets/images/bali/bali-ubud-palace-ibu-bus-jendela-720w.jpg">
    <meta name="twitter:site" content="@marklchaves">
    <meta name="twitter:title" content="stories">
    <meta name="twitter:description" content="to see rather than look - stories photography writing webdevelopment bali indonesia">
    <meta name="twitter:url" content="https://caughtmyeye.dev/">
    <meta name="twitter:card" content="summary">
    <link rel="canonical" href="https://caughtmyeye.dev/">
    

    Then, deactivate Yoast.

    Install and activate “Insert Headers and Footers” plugin or something similar. Your theme might already have a tool built-in that does the same thing.

    Grab the html code you copy/pasted above. Copy it again. Paste it into the header section of the Insert Headers and Footers plugin.

    Test your page on FB https://developers.facebook.com/tools/debug/

    Good luck!

    Thread Starter tu586

    (@tu586)

    That is super cool, thanks.

    “insert headers and footers plugin” might be what I was missing to do this without actually showing the picture on the actual page. I have been looking how to get the the header of each page and haven’t found a way in WordPress.

    Now, interesting question…

    Do you think I have to specify each social media site for information? twitter, facebook, etc??

    I for example use LinkedIn often, among other sites… it would be interesting to know how ohter sites react to the OG tags without any specific info for them.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to add a feture image without having the image showing in the pate?’ is closed to new replies.