Support » Plugin: Cooked - Recipe Plugin » Structured Data Image URL Error

Viewing 5 replies - 1 through 5 (of 5 total)
  • The error is because of the relative URL of the image
    /wp-content/uploads/2017/09/IMG_20170921_195335_270-700×525.jpg

    I added www.theketowife.com in the start of this link and it worked fine. You need to replace it with absolute URL.

    Thread Starter mwaxman1

    (@mwaxman1)

    How do I do that?

    Before switching over to Cooked, I had my recipes built manually as Posts. I had a separate structured plugin that was referencing relative image urls and it was working fine, so I’m not sure what’s different.

    Thread Starter mwaxman1

    (@mwaxman1)

    So for now, I edited the following line in wp-config:

    define(‘WP_CONTENT_URL’, ‘wp-content’);
    to
    define(‘WP_CONTENT_URL’, ‘http://www.theketowife.com/wp-content’);

    That appears to have fixed the issue for now, but I don’t like having it set as absolute. Shouldn’t Cooked be building full URLs for it’s image links in structured data, based on the relative URL?

    • This reply was modified 6 years, 5 months ago by mwaxman1.

    @mwaxman1 I am glad you fixed it yourself.

    I’m not sure about whether or not Cooked should be building complete URLs. Probably some expert or Cooked Developer might be able to help you.

    I am a beginner and learning myself. I could see the issue, and I tried to help you identify it. I hope it helped you. And I would love to follow this discussion to learn about it.

    Plugin Author Boxy Studio

    (@boxystudio)

    @mwaxman1:

    It might be something else that is messing with the image URL. If I run a test on a recipe from my demo site I’m not seeing this issue:

    https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Fdemos.boxystudio.com%2Fcooked%2Frecipes%2Fgrilled-tuna-salade-nicoise%2F

    Try this:

    1. Remove your custom code to make it break again
    2. If it’s still not working, try to disable all other plugins you have installed, besides Cooked of course. Test it again to see if the URL is fixed.
    3. If not, switch the theme to something default like Twenty Seventeen. Test it again to see if the URL is fixed.
    4. If any of the above two things DOES fix it, then we know that this is a theme or plugin conflict. You will need to re-enable them one at a time (theme & plugins) and run your test to see which one messes up the URL.

    Let me know if you end up narrowing this down and which item was causing the issue.

    • This reply was modified 6 years, 5 months ago by Boxy Studio.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Structured Data Image URL Error’ is closed to new replies.