SEO on Listings Fetched from External API?

Hi all. Working on a WordPress site right now where one of the templates is an archive of property listings, and clicking on the listing brings up a listing single. The source of truth for the listings will not be the WordPress install, but rather a separate API accessible via GET request. What I’ve done in the past in applications like this is run a nightly cron job that fetches all the listings and stores them as custom post types in WordPress, but that feels very clunky and doesn’t update the listings in real-time. I’d love to be able to just fetch the listings from the frontend on archive page load and then dynamically populate the single data via API call as well. The problem I’m running into is SEO – trying to wrap my head around how I could dynamically generate the listing single pages in the sitemap as well as make sure both archive and single templates are populated with the correct content when the pages are crawled. Has anyone ever done anything like this? The only thing I’ve really found on this topic is [this article from Yoast]), but it’s talking more generally and doesn’t give step-by-step advice on how to do it. Thanks in advance!

1 Comment
  1. If you’re pulling the content from a third party, then WordPress doesn’t need to be involved, and you’d use something like Gatsby. But if you need a sitemap, then you’re going to have to regularly run a cron job to store the URLs from the third party.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer