• Resolved ashburnham

    (@ashburnham)


    Is there a way I can get the image URL that is being used by og:image into a variable to be used elsewhere on the page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    Depending on what you’re doing, you can access it in different ways.
    If it’s stored in the database, it’s in a meta field called _aioseop_opengraph_settings.
    There’s also a filter hook https://semperplugins.com/documentation/aiosp_opengraph_meta/

    Thread Starter ashburnham

    (@ashburnham)

    Thanks Michael,

    The _aioseop_opengraph_settings is not showing a value so I guess the hook is the best way. Are you able to advise how I can use this hook to get the og:image URL being used.

    I can handle PHP but never applied a hook of any description before and the documentation is not really guiding me too well.

    • This reply was modified 6 years, 7 months ago by ashburnham.
    • This reply was modified 6 years, 7 months ago by ashburnham.
    Thread Starter ashburnham

    (@ashburnham)

    Can anyone help with this? I’m sure getting the og:image URL using the aiosp_opengraph_meta hook is simple enough but having never used a filter before I am struggling to make it work. Any help or guidance much appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Get og:image URL into a variable’ is closed to new replies.