Web integrations

With the WordPress plugin, it is possible to connect our ITGallery inventory with any WordPress website. All we have to do is install the plugin, register the connection token and, from ITGallery, select the works, artists and exhibitions that we want to share.
To download the plugin from ITGallery, go to "My gallery -> integrations -> WordPress plugin".
Important note: the plugin is compatible with MySQL 5.7.8 (2015) and above.


Starting

To use the plugin, it's necessary to configure the token to interact with the API. The token can be obtained from "My gallery -> Integrations -> Web".

Once the token has been configured, a first import of the data can be done using a button in the general settings section of the ITgallery WP plugin (“Gallery Options”).


Shortcodes

There are 6 available shortcodes to use in posts or WP 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
You can activate «archive» or artworks list, artists and exhibitions from plugin config.
By default, those are the active routes: (“/itg_artists”, “/itg_works” y “itg_expos”).
Note: It may be necessary to update the “permalinks” on the web to see the routes (Settings → Permanent links).

It is possible to modify the path of each listing, as well as the fields to display, HTML and CSS.


Editing HTML/CSS

It is possible to modify the HTML and CSS displayed from the plugin configuration, as well as the visible fields on the front-end.

To display dynamic fields in HTML, they will have to be placed between two "%" symbols. For example, it is possible to display the name of an artist with %name%.


Forcing data sync

In the plugin options, there is a button to force content updates by calling the ITGallery API


Data sync via Cron

By default, the plugin activates a WordPress cron that runs daily to update artists, artworks, and exhibits. It is also ready to be able to execute the import through real cron on the server:

The PHP file that does the synchronization is, inside WordPress, at: wp-content/plugins/itgallery-wp/itgallery-import.php

It can be executed directly from the server with a command line similar to the following (modifying the PHP and file path according to the server): /usr/bin/php /PATH_SERVIDOR/wp-content/plugins/itgallery-wp/itgallery-import.php


Anex 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

Still need help? Contact Us Contact Us