• Resolved featuremonkey

    (@featuremonkey)


    I would like to view all the posts with a canonical URL that is not the same as my website’s domain. I can do this by adding the canonical URL to the REST API. How can I add SEO Framework’s canonical URL to the Post object from the REST API?

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

    (@cybr)

    Hello!

    I have no experience with the REST API on this level. But, you can obtain TSF’s canonical URL via tsf()->get_canonical_url() for the current request or tsf()->get_canonical_url( [ 'id' => 42 ] ) for page 42.

Viewing 1 replies (of 1 total)
  • The topic ‘How to Add Canonical URL to REST API’ is closed to new replies.