Web integrations - WordPress plugin

From the ' Integrations' tab you can connect your ITGallery account with other systems, letting them access the artworks, exhibitions or artists you choose, and so send the information they need to other platforms quickly and easily.

WordPress plugin

With the WordPress plugin you can connect your ITGallery inventory to any website built in WordPress. All you have to do is install the plugin, register the connection token and, from ITGallery, select the artworks, artists and exhibitions you want to share. 

To download the plugin from ITGallery, go to " My Gallery > integrations > WordPress plugin"*.

*Remember: the plugin is compatible with MySQL from version 5.7.8 (2015) onwards. 
First use

To use the plugin, you need to set up the token that interacts with the API. You can get the token from " My Gallery > Integrations > Web". 

Once the token is set up, you can run a first import of the data using a button in the general settings section of the ITgallery WP plugin (“Gallery Options”).

Shortcodes
There are 6 shortcodes available to use in WordPress posts or pages.
  • [itgallery_display_artist artist_id=X]
  • [itgallery_display_artists]
  • [itgallery_display_work work_id=X]
  • [itgallery_display_works]
  • [itgallery_display_expo expo_id=X]
  • [itgallery_display_expos]
Lists
In the plugin settings, you can enable the «archive» pages or lists of artworks, artists and exhibitions.
By default, the routes (“/itg_artists”, “/itg_works” and “itg_expos”) are enabled*.
*You may need to refresh the website's “permalinks” to see the routes (Settings → Permalinks).
You can change the route of each list, as well as the fields shown, the HTML and the CSS.
HTML/CSS changes   
You can change the HTML and CSS shown from the plugin settings, as well as the fields visible on the front end.
To show dynamic fields in the HTML, put them between two “%” symbols. For example, you can show an artist's name with %name%.
Force data synchronisation
In the plugin options there is a button to force content updates by calling the ITgallery API
Data synchronisation by Cron

By default, the plugin enables a WordPress cron that runs daily to update artists, artworks and exhibitions. It is also ready to run the import through a real cron on the server:

The PHP file that carries out the synchronisation is located, within WordPress, at: wp-content/plugins/itgallery-wp/itgallery-import.php

It can be run directly from the server with a command similar to the following (adjusting the PHP path and the file path to your server): /usr/bin/php /SERVER_PATH/wp-content/plugins/itgallery-wp/itgallery-import.php


APPENDIX I: AVAILABLE FIELDS
Artist
  • id
  • link
  • name
  • surname
  • type
  • phone1
  • phone2
  • email1
  • email2
  • photo
  • document_id
  • bio
  • notes
  • country
  • city
  • nacionality
  • birth_country
  • birth_date
  • birth_city
  • death_country
  • death_date
  • death_city
  • studio_address
  • personal_address
  • last_modified
  • created
Artwork
  • id
  • link
  • name
  • inventory_id
  • year
  • type
  • technique
  • location
  • sub_location
  • main_image
  • thumbnail
  • availability
  • artist
  • prices
  • variable_measures
  • dimensions
  • tags
  • last_modified
  • created
Exhibition
  • id
  • link
  • name
  • description
  • timetable
  • type
  • caracter
  • main_image
  • thumbnail
  • opening_date
  • closing_date
  • opening_begin_hour
  • opening_end_hour
  • url
  • last_modified
  • created