• Resolved creazy231

    (@creazy231)


    Dear,
    I’d like to have access to all relevant meta data using the WordPress Rest API.
    What do I have to do to get these information?

    Edit: I have access to all data I updated myself but if I leave a field blank to get the automatically generated data, the meta response of my API is empty and not filled with the default data.

    Thanks

    • This topic was modified 5 years, 3 months ago by creazy231.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi there!

    My apologies for the delay, server maintenance interfered…

    If you want to obtain the rendered data, which includes fallbacks/generated data, you’ll find most use out of this class as a reference:
    https://github.com/sybrew/the-seo-framework/blob/master/inc/classes/render.class.php

    More specifically, these methods are useful:

    get_title()
    get_description()
    get_open_graph_description()
    get_open_graph_title()
    get_image_from_cache() // To be deprecated as soon as 3.4 or 3.5!!
    create_canonical_url()
    

    You can access them via the_seo_framework()->{$function_name}().
    For example: the_seo_framework()->get_title()

    I’m not sure if The SEO Framework is aware of the REST request; I have yet to see widespread implementations of the REST API. However, all the aforementioned methods (except for the image one), accept input parameters id and taxonomy.

    If you’re running into issues, please reach out to me. I’d love to know how other developers work (and stumble) with TSF so that I can improve this. Cheers!

    Thread Starter creazy231

    (@creazy231)

    Awesome! 🙂 I’ll give it a try in the next days.

    Thank you for the detailed answer 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Rest API response’ is closed to new replies.