• Resolved brianpunch

    (@brianpunch)


    I’m using jetpack to enable me to share my comics, but whatever I do I can’t get it to point to the featured images, even though I’ve also tried a few additional plugins (such as Facebook Thumb Fixer)

    Looking at the source code the comic pages seem to be pointing to the right images, but they have various extensions (such as ?fit=1000%2C691)

    On my homepage it doesn’t grab any images at all. (“https://s0.wp.com/i/blank.jpg”)

    The meta tags seem to be showing up in the body instead of the head. Would that be a factor?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What happens if you disable Jetpack’s Photon?

    If that doesn’t help, I recommend asking at https://www.ads-software.com/support/plugin/jetpack#new-post so the plugin’s / theme’s developers and support community can help you with this.

    There is also a <div class="primary"> as the first thing in the page source before the <html> element. Maybe an error in the theme header? That could be throwing Facebook off. The tags themselves seem to be OK.
    https://prntscr.com/hsnmji

    Edit: Actually that’s exactly what FB Object Debugger complains about

    • This reply was modified 7 years, 2 months ago by alichani.
    Thread Starter brianpunch

    (@brianpunch)

    Thanks for the replies!

    Steve, I tried turning Photon off (the equivalent of switching off “Speed up images and photos,” correct? Maybe I’ll try using that forum as well.

    alichani, I agree that the meta tags showing up so low in the code could be the problem but I don’t know how to adjust it since jetpack generates this code and I don’t do it manually.

    I put <div class=”primary”> near the beginning of head.php instead of at the very beginning of index.php where it was previously, but all that did was throw the layout off, it didn’t seem to affect the OG code. Any thoughts?

    @brianpunch
    the <div class=”primary”> goes after the </head> <body>. Essentially you want it to be inside the body. The way you have it now it’s outside the whole html and it’s causing validation errors and, possibly, Facebook bot to have a fit.
    It creates a div on a document that hasn’t yet started (it starts at <html>).

    Try putting it at the end of header.php or after the get_header(); in page.php. You may also need to move the matching </div> inside the <body> element in footer.php

    • This reply was modified 7 years, 2 months ago by alichani.
    Thread Starter brianpunch

    (@brianpunch)

    @alichani that ended up being the solution, putting the “primary” div in a more sensible location, thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Open Graph Troubleshooting’ is closed to new replies.