Support » Plugin: The SEO Framework » dynamically change/update in code the social tags

  • Hi,

    We are having some issues with social tags. Our site is custom made and the right data isn’t pulled.

    Is it possible to dynamically change/update in code the social tags (og: image, title, description) for custom post type.

    Thank you,
    Moshe.

Viewing 1 replies (of 1 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi Moshe,

    Yes, there are a plethora of hooks available.

    The filters you’ll be most interested in are these:

    // Titles:
    the_seo_framework_title_from_custom_field
    the_seo_framework_title_from_generation
    
    // Description (uses older naming scheme...):
    the_seo_framework_custom_field_description
    the_seo_framework_generated_description
    
    // Images (advanced!)
    the_seo_framework_image_generation_params

    All filters are documented in the source code of the plugin.

    For images, I believe it’s best to work from this example here: https://gist.github.com/sybrew/4b48d76199722be049cd29575d4fae7a

    You’ll need to change my_post_type, and the yield values in my_generate_fallback_image_for_my_post_type.

    I hope this gets you started! Cheers 🙂

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.