External Content Integration

The www.nasa.gov site is actually two sites – www.nasa.gov and science.nasa.gov. Both were built at the same time. I think of them as an air-gapped WP multisite.

The thing was, there was a requirement to have content from each site native in the other one. Native in post-selectors in blocks, search, archives, and everywhere.

Using the REST API each site ingests a shell of the other sites content and stores it as a post type mirroring the native post-type. At that point, what is required is query filtering, permalink filtering, and image filtering. Some minor work has to be done for archives. But, most of the work at the query level solves for all of it.

The hardest part was solving for timezone differences between sites as it related to cron.

#WordPress #coolFeature