Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 2.51 KB

File metadata and controls

44 lines (31 loc) · 2.51 KB

Wordpress shortcodes for Artsdata

This is a Wordpress plugin that adds shortcodes for retrieving and displaying data from Artsdata and Wikidata in a WordPress site. This plugin is currently only used to power the CAPACOA LIVE directory, but it could be used to power other kinds of directories on WordPress websites.

The 3 shortcodes are:

  • [artsdata_orgs] => lists organization names from Artsdata located in a source graph
  • [artsdata_id] => displays details of a specific entity using ranked graphs from Artsdata
  • [artsdata_admin] => displays buttons for admin to reload CAPACOA database or reload data from Wikidata (https://capacoa.ca/en/artsdata-admin/)

How to install

  1. Download the zip file in the release
  2. Open WP Admin
  3. Navigate to the Plugins panel
  4. Click "Add New"
  5. Click "Upload Plugin"
  6. Activate the plugin

Sample member profile generated by the plugin

image

Logic for retrieving venue information from Wikidata

The required triples for retrieving venue information are desribed in this diagram:

Image

Trouble shooting

The following URLs can be used to test data without passing through a cache.

  1. list of members in JSON http://api.artsdata.ca/query?sparql=https://raw.githubusercontent.com/culturecreates/artsdata-shortcode/refs/heads/master/public/sparql/members.sparql&source=http://kg.artsdata.ca/culture-creates/artsdata-planet-capacoa/capacoa-members

  2. Example Organization in JSON http://api.artsdata.ca/query?adid=K14-29&frame=capacoa/member2&format=json&sparql=https://raw.githubusercontent.com/culturecreates/artsdata-shortcode/refs/heads/master/public/sparql/member_detail.sparql

  3. Example Person in JSON http://api.artsdata.ca/query?adid=K14-141&frame=capacoa/member2&format=json&sparql=https://raw.githubusercontent.com/culturecreates/artsdata-shortcode/refs/heads/master/public/sparql/member_detail.sparql

Local Wordpress Development

  1. Clone this repo
  2. Edit docker-compose.yml to set your volumes path to your local path for editing the plugin code.
  3. Run docker compose up &
  4. Note: To view social media icons add the following line to artsdata-shortcodes.php wp_enqueue_style('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');