Museum Data Service

Background

We’ve added a CultureObject “provider” (basically, a data import mechanism) for the Museum Data Service (MDS).

This means that you can now get collections data from the https://museumdata.uk/ website and pull this into any WordPress installation, where you can do whatever you need with that data. You might make a simple online collections website, for example, or want to build some simple curatorial tools for your in-house team.

Outline process

There are a few steps which we we outline here, with further detail below.

  1. Get your data – visit https://museumdata.uk/ and get a token. 
  2. Install the CultureObject plugin by downloading it from the official WordPress plugin directory
  3. Run an import by providing the plugin with your token
  4. Choose how you want to display the records on your WordPress site
  5. Add additional fields and functionality if you need

In depth…

1. Get your data

Go to https://museumdata.uk/, click on “search objects” and then carry out the search using the filters on the site to hone down what you want to pull into your WordPress website.

When you are done, click on “Get an API token” at the bottom of the search result list. Fill in the form, accept the terms and then copy the long token string somewhere safe.

This token is specific to the search you’ve carried out and sets the constraints for the data that we fetch using CultureObject. It could therefore be for a topic, a keyword, a complete museum collection or something totally different – whatever you set, we will fetch using the plugin. 

Please note that CultureObject is really only suited to smaller datasets, up to a few thousand in number. You will very likely slow or even break your website / server if you try a query with tens of thousands of records in it! Test first on a development site if you’re unsure!

2. Install the CultureObject plugin

As with any software… we highly recommend that you 1) take a backup first and 2) only install the plugin on a non-live / development server so that you can test with your environment before trying on live. We are not responsible for any issues that may occur, including loss of data, downtime, issues with styling, etc!

CultureObject requires a number of things from your hosting environment. These include:

  1. An up-to-date version of PHP (8.1 or higher). If you have lower than this you have bigger problems than CultureObject to worry about – your PHP is no longer supported and is therefore insecure…!
  2. A “standard” WordPress installation / theme. That means we don’t like page-builders like Divi, Elementor, Oxygen, etc. You can try CultureObject with these but we have no idea whether it’ll work or not!
  3. An up-to-date version of WordPress core (as of writing this is 6.8.2)
  4. Up-to-date plugins and themes

Once installed, enable the plugin by clicking the “Activate” link or button. 

3. Run an import

Go to the CultureObject settings screen (CultureObject > Main Settings in the left hand admin bar of WordPress). 

Select “Museum Data Service” from the “Sync Provider” dropdown and click “Save Changes”.

Now go to Culture Object > Provider Settings. Paste in the MDS token you got in Step 1 above, click Save Changes and then push the “Begin Import” button.

Stay on this screen until the import has completed. 

Once the import has run, go to Objects in the left hand admin bar and you will see a list of the objects that you selected as part of your MDS search with this token. 

A note on how we import data

MDS data is not 100% structured but there are 13 fields which have been mapped to Spectrum (where they exist in the data shared with MDS) and which we have pulled out as distinct items in the import. 

These are:

Field NameSpectrum Mapping
Object Numberspectrum/object_number
Titlespectrum/title
Object Namespectrum/object_name
Credit Linespectrum/credit_line
Brief Descriptionspectrum/brief_description
Associated Conceptspectrum/associated_concept
Object Production Datespectrum/object_production_date
Object Production Placespectrum/object_production_place
Object Production Personspectrum/object_production_person
Materialspectrum/material
Associated Personspectrum/associated_person
Associated Placespectrum/associated_place
Organisation@admin.data_source.organisation

These are pulled into corresponding WordPress meta-fields for each object record, named as above but in lower case and with underscores instead of spaces. (example: Production Date is the meta-field called production_date, etc…).

You can use Advanced Custom Fields (or Pro) to display a more user-friendly view of your object records if you like. See below for an example ACF field-set that you can import if you need – or just make your own based on the above field names.

Note that the entire dataset is also imported into post meta to @document – so can be queried by any WordPress-savvy developer in much more powerful ways if needed. See below for details on how you can use the “display plugin” to show these meta fields on your object records.

You can follow the above instructions to re-run the import at any time. Note that you can also add additional meta-fields to any object record if you like to give “local” contextualisation. This data should not be overwritten by a new import. 

We recommend adding (if you don’t have it installed already), the Advanced Custom Fields (or Advanced Custom Fields Pro) plugin which will give you a more user-friendly admin view of your record data. 

You can make your own ACF field set (on the “object” post type) or here is a pre-made selection which you can import by going to ACF > Tools > Import – then select this file and choose “Import JSON”:

See the ACF json file here. Depending on your browser you may need to right click > save as in order to download this file rather than view it.

Without doing anything else you can probably now visit yoursite.com/object and see a list of your object records. This is the “archive” list of records – clicking a title will (depending on your theme) take you through to a “single” record detail page.

If you don’t see either the list or the single items, try going to Settings > Permalinks – then click the Save Changes button without making any changes. This will flush permalinks on your site and can solve initial issues with seeing these views.

This should all work, but isn’t very exciting – next is displaying the data on your site.