Beyond the Spectacle

Site URL: https://research.kent.ac.uk/beyondthespectacle/
Dashboard: https://research.kent.ac.uk/beyondthespectacle/wp-admin

Theme: UoK Child Theme – Beyond the Spectacle
Git repo: https://gitlab.kent.ac.uk/websolutions/themes/beyond-the-spectacle

Uploading items to the site

This site makes use of the WP Ultimate CSV Importer plugin by Smackcoders which once activated can be found under the menu option ‘Import / Export > Import‘. The plugin does have a ‘quirk’ where you need to be a user of the site, with your role set as ‘Administrator‘. If your role is ‘Site Owner‘ you may need to be removed and re-added as an ‘Administrator‘.

Note: It is possible to import data to extend onto what is already there, or a wholly new dataset. If you intend to delete items and reimport ensure that you empty the ‘Records’ bin first of all those you have deleted. Otherwise WordPress will suffix all URLs with -2, etc

Column names

To make the import process a little smoother the column values on the header row should match the following:

  • post_title
  • tribal_affiliation
  • uk_location
  • date
  • reason_for_travel
  • description
  • external_image
  • bibliographic_sources

Commas / Semicolons

Where we have multiple values within one cell in the data, such as themes, we need to ensure that the values are comma separated. If you have values separated by semicolons please do a find and replace. This will ensure that the import plugin can differentiate between the values and create the taxonomies accordingly.

CSV format

The CSV file must be saved in UTF-8 format.

In UTF-8 format we cannot save a number with multiple zeros at the start, such as ‘00123‘. What we need to do is add some text to the start, such as ‘abc-00123‘, import the data, then run ‘Better Search Replace‘ to find the string ‘abc-‘ and remove it. Using this method you want to make sure you use a string which will 100% not exist anywhere in the site, such as ‘catdogcat-‘ (stupid I know).

Upload to WordPress

  1. In the plugin, select your CSV
  2. Then select ‘New Item‘ and choose ‘Records‘ as the post type to import to
  3. Then match up the relevant core fields (post_title)
  4. Then scroll to the bottom to ‘Create WP Custom Fields‘ and add a custom field for each column (except id)
  5. Copy and paste the column header into the name field, and select the corresponding column from the dropdown
  6. Then continue through to ‘Start import‘. It should take a few minutes to complete

Exporting data

The Items and Collections data can be easily exported to CSV files via the ‘Import / Export > Export‘ section.

  1. First, select the content to be exported (i.e. Items)
  2. Then click the blue ‘Customise Export File‘ button
  3. At the next screen you can choose which fields of data you wish to import. If you wish to export everything, click ‘Add All‘ and then ‘Continue‘.If you select ‘Add All’ it will include a host of additional WordPress related fields. You may want to select the relevant fields of data as per the column names used on our import file referenced above. To do this open the ‘Custom Fields‘ on the right, then drag and drag the fields over one by one. Ensure to select the one without the underscore beforehand, for instance ‘description‘ not ‘_description‘For tags open the ‘Taxonomies‘ tab and move across ‘Tags‘. This will ensure the correct data is exported
  4. Click ‘Save & Run Export
  5. This will run the export process, only taking a few seconds. Once complete you can download a CSV of the final dataset