• OrignalCeiling

    (@abandonedar)


    Hi All I have a bit of an idea that is probably not possible the way I’m hoping, but it’s worth a try.

    So I have a series of websites that are all the same in design, layout, back end etc, however they are just different states.

    AbandonedAR.com, AbandonedKS.com, AbandonedOK.com, etc.

    They are all beautifully sorted into numerous categories: Decade Built / Abandoned, class (Church, residential, hospital, etc) status, historic nomination, etc. I’ve spent a lot of time breaking them all down into these categories that users can browse through with ease.

    This is wher the dream come in: Now we have AbanondedAtlas.com and I’d love to be able to have an ALL state churches, hospitals, decades, historic nomination, for sale, etc archive page where it bring in data from all sites. I could do this by hand each time we post, but UGH, as I’m sure we all like to do, I like to automate things. Is there any code or strings, plugins to pull in data from multiple sites into one archive page:

    EX: if “SITE address” & taxonomy “church” get_banner, get_excerpt, get_date etc.

    I hope this makes sense, but is the anyway to do this? I thought about iframes, but I know that can be slow and wonky.

    Any thoughts are appreciated! Thanks in advance!! Also, I want to keep the individual sites too.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Alexander

    (@alextonio22)

    Hi Orignal Ceiling,

    I completely understand your idea of creating a centralized archive page on AbandonedAtlas.com that aggregates content from multiple state-specific sites like AbandonedAR.com, AbandonedKS.com, and AbandonedOK.com. While it may pose some challenges, it’s definitely worth exploring. There are some potential avenues to explore, including the use of the WordPress REST API.

    WordPress REST API

    Consider utilizing the WordPress REST API to fetch and display data from the individual state sites. The REST API allows you to retrieve content, including custom taxonomies, from different sites. You can use the wp_remote_get function to make HTTP requests to each site’s API endpoint and then parse and display the data accordingly.

    Feel free to reach out if you have further questions or need more detailed assistance.

    Best regards,

    Alexander

    Moderator bcworkz

    (@bcworkz)

    The REST API is great suggestion. I’m confident it can be made to work, but it might be rather pokey. You may wish to make use of persistent object caching to reduce how often you need to make API requests.

    If all of these sites happen to be part of a single WP Network, there is another option. PHP can switch between various network sites with switch_to_blog(). You could loop through all the sites, switching to each in turn. Then collect the desired data and move on to the next until all data had been accumulated. I believe this will be somewhat faster than making API requests, but caching results might still be a good idea.

    Creating an archive with categories from multiple sites is possible but requires gathering data from each site, normalizing it, merging categories, and building an archive. It’s complex and needs regular updates to reflect site changes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Categories from multiple sites to one archive. Impossible dream? Or possible?’ is closed to new replies.